mirror of https://github.com/lukechilds/rollup.git
Luke Page
9 years ago
22 changed files with 34 additions and 27 deletions
@ -1,5 +1,5 @@ |
|||||
import { relative } from 'path'; |
import { relative, normalize } from 'path'; |
||||
import { format } from 'util'; |
import { format } from 'util'; |
||||
|
|
||||
assert.equal( format( 'it %s', 'works' ), 'it works' ); |
assert.equal( format( 'it %s', 'works' ), 'it works' ); |
||||
assert.equal( relative( 'a/b/c', 'a/c/b' ), '../../c/b' ); |
assert.equal( relative( 'a/b/c', 'a/c/b' ), normalize('../../c/b') ); |
||||
|
@ -1,8 +1,8 @@ |
|||||
import { relative } from 'path'; |
import { relative, normalize } from 'path'; |
||||
import foo from './foo'; |
import foo from './foo'; |
||||
|
|
||||
var path = 'foo/bar/baz'; |
var path = 'foo/bar/baz'; |
||||
var path2 = 'foo/baz/bar'; |
var path2 = 'foo/baz/bar'; |
||||
|
|
||||
assert.equal( relative( path, path2 ), '../../baz/bar' ); |
assert.equal( relative( path, path2 ), normalize('../../baz/bar') ); |
||||
assert.equal( foo, '../../c/b' ); |
assert.equal( foo, normalize('../../c/b') ); |
@ -1,6 +1,6 @@ |
|||||
import { relative } from 'path'; |
import { relative, normalize } from 'path'; |
||||
|
|
||||
var path = 'foo/bar/baz'; |
var path = 'foo/bar/baz'; |
||||
var path2 = 'foo/baz/bar'; |
var path2 = 'foo/baz/bar'; |
||||
|
|
||||
assert.equal( relative( path, path2 ), '../../baz/bar' ); |
assert.equal( relative( path, path2 ), normalize('../../baz/bar') ); |
@ -1,5 +1,6 @@ |
|||||
import foo from './foo'; |
import foo from './foo'; |
||||
import bar from './bar'; |
import bar from './bar'; |
||||
|
import { normalize } from 'path'; |
||||
|
|
||||
assert.equal( foo, 'foo' ); |
assert.equal( foo, 'foo' ); |
||||
assert.equal( bar(), '../../baz/bar' ); |
assert.equal( bar(), normalize('../../baz/bar') ); |
||||
|
@ -1,5 +1,6 @@ |
|||||
import foo from './foo'; |
import foo from './foo'; |
||||
import bar from './bar'; |
import bar from './bar'; |
||||
|
import { normalize } from 'path'; |
||||
|
|
||||
assert.equal( foo, 'foo' ); |
assert.equal( foo, 'foo' ); |
||||
assert.equal( bar(), '../../baz/bar' ); |
assert.equal( bar(), normalize('../../baz/bar') ); |
||||
|
Loading…
Reference in new issue