-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(typescript): complete test cases for declarationdir on ts_projec…
…t.bzl to include sourcemaps
- Loading branch information
Showing
6 changed files
with
16 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
1 change: 1 addition & 0 deletions
1
packages/typescript/test/ts_project/declarationdir/tsconfig.json
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"sourceMap": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"types": [] | ||
|
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
const assert = require('assert'); | ||
|
||
const types_files = process.argv.slice(2); | ||
const code_files = process.argv.slice(3); | ||
const types_files = process.argv.slice(2, 4); | ||
const code_files = process.argv.slice(4, 6); | ||
assert.ok(types_files.some(f => f.endsWith('declarationdir/out/a.d.ts')), 'Missing a.d.ts'); | ||
assert.ok(types_files.some(f => f.endsWith('declarationdir/out/a.d.ts.map')), 'Missing a.d.ts.map'); | ||
assert.ok(code_files.some(f => f.endsWith('declarationdir/out/a.js')), 'Missing a.js'); | ||
assert.ok(code_files.some(f => f.endsWith('declarationdir/out/a.js.map')), 'Missing a.js.map'); |
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
1 change: 1 addition & 0 deletions
1
packages/typescript/test/ts_project/declarationdir_with_value/tsconfig.json
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"sourceMap": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"types": [] | ||
|
10 changes: 8 additions & 2 deletions
10
packages/typescript/test/ts_project/declarationdir_with_value/verify.js
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 |
---|---|---|
@@ -1,9 +1,15 @@ | ||
const assert = require('assert'); | ||
|
||
const types_files = process.argv.slice(2); | ||
const code_files = process.argv.slice(3); | ||
const types_files = process.argv.slice(2, 4); | ||
const code_files = process.argv.slice(4, 6); | ||
assert.ok( | ||
types_files.some(f => f.endsWith('declarationdir_with_value/out/types/a.d.ts')), | ||
'Missing a.d.ts'); | ||
assert.ok( | ||
types_files.some(f => f.endsWith('declarationdir_with_value/out/types/a.d.ts.map')), | ||
'Missing a.d.ts.map'); | ||
assert.ok( | ||
code_files.some(f => f.endsWith('declarationdir_with_value/out/code/a.js')), 'Missing a.js'); | ||
assert.ok( | ||
code_files.some(f => f.endsWith('declarationdir_with_value/out/code/a.js.map')), | ||
'Missing a.js.map'); |