File tree Expand file tree Collapse file tree 5 files changed +25
-1
lines changed Expand file tree Collapse file tree 5 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ async function main() {
28
28
main ( ) ;
29
29
30
30
async function compileAllAsc ( ) {
31
- const ascFiles = await glob ( "./tests/**/* .ts" ) ;
31
+ const ascFiles = await glob ( "./tests/**/asc .ts" ) ;
32
32
const transformFile = require . resolve ( "../transform.js" ) ;
33
33
for ( const ascFile of ascFiles ) {
34
34
console . log ( `Compiling ${ ascFile } ...` ) ;
Original file line number Diff line number Diff line change
1
+ export { swapAndPad } from "./exports" ;
Original file line number Diff line number Diff line change
1
+ import { swappedConcat } from "./imports" ;
2
+
3
+ export function addExclamations ( s : string ) : string {
4
+ return "!" + s + "!" ;
5
+ }
6
+
7
+ export function swapAndPad ( a : string , b : string ) : string {
8
+ return addExclamations ( swappedConcat ( a , b ) ) ;
9
+ }
Original file line number Diff line number Diff line change
1
+ export declare function swappedConcat ( a : string , b : string ) : string ;
Original file line number Diff line number Diff line change
1
+ describe ( "as-bind" , function ( ) {
2
+ it ( "should handle multiple files correctly" , async function ( ) {
3
+ const instance = await AsBind . instantiate ( this . rawModule , {
4
+ imports : {
5
+ swappedConcat ( a , b ) {
6
+ return b + a ;
7
+ }
8
+ }
9
+ } ) ;
10
+ assert ( typeof instance . exports . addExclamations === "undefined" ) ;
11
+ assert ( instance . exports . swapAndPad ( "a" , "b" ) === "!ba!" ) ;
12
+ } ) ;
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments