File tree Expand file tree Collapse file tree 4 files changed +24
-1
lines changed
Expand file tree Collapse file tree 4 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 66 "types" : " dist/index.d.ts" ,
77 "scripts" : {
88 "build" : " tsc" ,
9- "test" : " echo \" Error: no test specified \" && exit 1 "
9+ "test" : " npm run build && node test "
1010 },
1111 "author" : " Simon Haenisch (https://github.com/simonhaenisch)" ,
1212 "repository" : " simonhaenisch/rollup-plugin-typescript-paths" ,
Original file line number Diff line number Diff line change 1+ module . exports = { foo : 'bar' } ;
Original file line number Diff line number Diff line change 1+ const { strictEqual } = require ( 'assert' ) ;
2+ const { resolve } = require ( 'path' ) ;
3+ const { resolveTypescriptPaths } = require ( '../dist' ) ;
4+
5+ const plugin = resolveTypescriptPaths ( { tsConfigPath : resolve ( __dirname , 'tsconfig.json' ) } ) ;
6+
7+ const resolved = plugin . resolveId ( '@foobar' , '' ) ;
8+
9+ try {
10+ strictEqual ( resolved , 'test/foo/bar.js' ) ;
11+ console . log ( 'PASSED' ) ;
12+ } catch ( error ) {
13+ throw error ;
14+ }
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "baseUrl" : " test" ,
4+ "paths" : {
5+ "@foobar" : [" foo/bar" ]
6+ }
7+ }
8+ }
You can’t perform that action at this time.
0 commit comments