-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Remove top level support (currently not possible)
- Loading branch information
1 parent
6354d4a
commit 63032d1
Showing
7 changed files
with
65 additions
and
25 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
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,18 @@ | ||
/** | ||
* Copyright (C) Daniel Kuschny (Danielku15) and contributors. | ||
* Copyright (C) Microsoft Corporation. All rights reserved. | ||
* | ||
* 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. | ||
*/ | ||
|
||
import { expectTestTree, getController } from '../util'; | ||
|
||
describe('typescript top level await', () => { | ||
it('discovers tests fails', async () => { | ||
const c = await getController(); | ||
|
||
await expectTestTree(c, []); | ||
}); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
spec: '**/*.test.ts', | ||
extension: [ | ||
"ts" | ||
], | ||
"node-option": [ | ||
"experimental-specifier-resolution=node", | ||
"import=tsx", | ||
"no-warnings" | ||
], | ||
}; |
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,26 @@ | ||
import { strictEqual } from 'node:assert'; | ||
|
||
// just some typescript code which would be valid directly in Node | ||
|
||
function topLevel(a: number): string { | ||
return a.toString() as string; | ||
} | ||
|
||
const fn = async () => {}; | ||
await fn(); | ||
|
||
describe('math', () => { | ||
function inDescribe(a: number): string { | ||
return a.toString() as string; | ||
} | ||
inDescribe(1); | ||
topLevel(0); | ||
|
||
it('addition', async () => { | ||
strictEqual((1 + 1) as number, 2 as any as number); | ||
}); | ||
|
||
it('subtraction', async () => { | ||
strictEqual((1 - 1) as number, 0 as any as number); | ||
}); | ||
}); |
File renamed without changes.
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