Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
update cli-utils test, normalize paths to make it cross platform
Browse files Browse the repository at this point in the history
  • Loading branch information
aelbore committed Dec 30, 2019
1 parent 67d000b commit 262a9fc
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/cli-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ describe('CLI utils', () => {
})

const input = getEntryFile('aria-build');
assert.strictEqual(input, './src/index.ts')
assert.strictEqual(
path.normalize(input),
path.normalize('./src/index.ts')
)
})

it('should [getEntryFile] when index.js is exist.', () => {
Expand All @@ -129,7 +132,10 @@ describe('CLI utils', () => {
})

const input = getEntryFile('aria-build');
assert.strictEqual(input, './src/index.js')
assert.strictEqual(
path.normalize(input),
path.normalize('./src/index.js')
)
})

it('should [getEntryFile] when <package-name>.ts is exist.', () => {
Expand All @@ -138,7 +144,10 @@ describe('CLI utils', () => {
})

const input = getEntryFile('aria-build');
assert.strictEqual(input, './src/aria-build.ts')
assert.strictEqual(
path.normalize(input),
path.normalize('./src/aria-build.ts')
)
})

it('should [getEntryFile] when <package-name>.js is exist.', () => {
Expand All @@ -147,7 +156,10 @@ describe('CLI utils', () => {
})

const input = getEntryFile('aria-build');
assert.strictEqual(input, './src/aria-build.js')
assert.strictEqual(
path.normalize(input),
path.normalize('./src/aria-build.js')
)
})

it('should [getEntryFile] throw an error when no entry file exist.', () => {
Expand Down

0 comments on commit 262a9fc

Please sign in to comment.