-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run embedded test on both dart and node
- Loading branch information
Showing
19 changed files
with
231 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/file_importer.dart'; | ||
import '../dart_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/function.dart'; | ||
import '../dart_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/importer.dart'; | ||
import '../dart_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/length_delimited.dart'; | ||
import '../dart_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/protocol.dart'; | ||
import '../dart_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
library; | ||
|
||
import 'package:cli_pkg/testing.dart' as pkg; | ||
import 'package:test/test.dart'; | ||
|
||
import 'shared/embedded_process.dart'; | ||
|
||
void main() {} | ||
|
||
/// Ensures that the snapshot of the Dart executable used by [runSassEmbedded] is | ||
/// up-to-date, if one has been generated. | ||
void ensureSnapshotUpToDate() => pkg.ensureExecutableUpToDate("sass"); | ||
|
||
Future<EmbeddedProcess> runSassEmbedded( | ||
[Iterable<String> args = const Iterable.empty()]) => | ||
EmbeddedProcess.start(pkg.executableRunner("sass"), | ||
[...pkg.executableArgs("sass"), "--embedded", ...args]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
@Tags(['node']) | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/file_importer.dart'; | ||
import '../node_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
@Tags(['node']) | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/function.dart'; | ||
import '../node_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
@Tags(['node']) | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/importer.dart'; | ||
import '../node_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
@Tags(['node']) | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/length_delimited.dart'; | ||
import '../node_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
@Tags(['node']) | ||
library; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import '../shared/protocol.dart'; | ||
import '../node_test.dart'; | ||
|
||
void main() { | ||
setUpAll(ensureSnapshotUpToDate); | ||
sharedTests(runSassEmbedded); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2024 Google LLC. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
|
||
@TestOn('vm') | ||
@Tags(['node']) | ||
library; | ||
|
||
import 'package:cli_pkg/testing.dart' as pkg; | ||
import 'package:test/test.dart'; | ||
|
||
import '../ensure_npm_package.dart'; | ||
import 'shared/embedded_process.dart'; | ||
|
||
void main() {} | ||
|
||
/// Ensures that the snapshot of the npm package used by [runSassEmbedded] is | ||
/// up-to-date, if one has been generated. | ||
void ensureSnapshotUpToDate() => ensureNpmPackage; | ||
|
||
Future<EmbeddedProcess> runSassEmbedded( | ||
[Iterable<String> args = const Iterable.empty()]) => | ||
EmbeddedProcess.start(pkg.executableRunner("sass", node: true), | ||
[...pkg.executableArgs("sass", node: true), "--embedded", ...args]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.