Skip to content

Commit

Permalink
update test case
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Oct 27, 2017
1 parent 0163ffa commit d3b66d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions __test__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ test(`Defult alias file is empty`, () => {
})

test(`Defult 'alias.json' alias file is exist`, () => {
execSync('mv ./__test__/testboo/alias.json ./alias.json && npx babel-node ./__test__/testboo/boo.js', (error, stdout, stderr) =>{
exec('mv ./__test__/testboo/alias.json ./alias.json && npx babel-node ./__test__/testboo/boo.js', (error, stdout, stderr) =>{
expect(JSON.parse(stdout).test).toEqual(
path.resolve(path.resolve(__dirname, '../'), require('../alias.json').test)
)
})
execSync('mv ./alias.json ./__test__/testboo/alias.json')
exec('mv ./alias.json ./__test__/testboo/alias.json')
})

test(`Defult 'alias.config.js' alias file is exist`, () => {
execSync('mv ./__test__/testboo/alias.config.js ./alias.config.js && npx babel-node ./__test__/testboo/boo.js', (error, stdout, stderr) =>{
exec('mv ./__test__/testboo/alias.config.js ./alias.config.js && npx babel-node ./__test__/testboo/boo.js', (error, stdout, stderr) =>{
expect(JSON.parse(stdout).test).toEqual(
path.resolve(path.resolve(__dirname, '../'), require('../alias.config.js').test)
)
})
execSync('mv ./alias.config.js ./__test__/testboo/alias.config.js')
exec('mv ./alias.config.js ./__test__/testboo/alias.config.js')
})

test(`Test 'resolvePath' function`, () => {
Expand Down

0 comments on commit d3b66d9

Please sign in to comment.