forked from bazel-contrib/rules_nodejs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setup files in ts_web_test_suite
Closes bazel-contrib#266 PiperOrigin-RevId: 221465479
- Loading branch information
1 parent
55910e1
commit 444915a
Showing
5 changed files
with
56 additions
and
4 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
9 changes: 9 additions & 0 deletions
9
packages/concatjs/third_party/google3/rules_typescript/examples/testing/setup_script.spec.ts
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,9 @@ | ||
describe('setup script', () => { | ||
it('should load before the spec', async () => { | ||
expect((window as any).setupGlobal).toBe("setupGlobalValue"); | ||
}); | ||
}); | ||
|
||
// at least one import or export is needed for this file to | ||
// be compiled into an named-UMD module by typescript | ||
export {}; |
6 changes: 6 additions & 0 deletions
6
packages/concatjs/third_party/google3/rules_typescript/examples/testing/setup_script.ts
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,6 @@ | ||
// Setup global value that the test expect to be present. | ||
(window as any).setupGlobal = "setupGlobalValue"; | ||
|
||
// at least one import or export is needed for this file to | ||
// be compiled into an named-UMD module by typescript | ||
export { }; |
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