File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env node
2+
13const { strictEqual } = require ( 'assert' ) ;
24const { resolve } = require ( 'path' ) ;
35const { resolveTypescriptPaths } = require ( '../dist' ) ;
46
57const plugin = resolveTypescriptPaths ( { tsConfigPath : resolve ( __dirname , 'tsconfig.json' ) } ) ;
68
7- const resolvedBasic = plugin . resolveId ( '@foobar' , '' ) ;
8- const resolvedWildcard = plugin . resolveId ( '@bar/foo' , '' ) ;
9- const resolvedJs = plugin . resolveId ( '@js' , '' ) ;
10-
119try {
1210 strictEqual ( plugin . resolveId ( '@asdf' , '' ) , null ) ;
13- strictEqual ( resolvedBasic , 'test/foo/bar.ts' ) ;
14- strictEqual ( resolvedWildcard , 'test/bar/foo.ts' ) ;
15- strictEqual ( resolvedJs , 'test/js/index.js' ) ;
11+ strictEqual ( plugin . resolveId ( '\0@foobar' , '' ) , null ) ;
12+ strictEqual ( plugin . resolveId ( '@foobar' , '' ) , 'test/foo/bar.ts' ) ;
13+ strictEqual ( plugin . resolveId ( '@bar/foo' , '' ) , 'test/bar/foo.ts' ) ;
14+ strictEqual ( plugin . resolveId ( '@js' , '' ) , 'test/js/index.js' ) ;
15+
1616 console . log ( 'PASSED' ) ;
1717} catch ( error ) {
1818 throw error ;
You can’t perform that action at this time.
0 commit comments