-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maël Nison
committed
Apr 26, 2018
1 parent
19b9613
commit 8f453f6
Showing
3 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
exports.basic = require('./basic'); | ||
exports.dragon = require('./dragon'); | ||
exports.script = require('./script'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* @flow */ | ||
|
||
import type {PackageDriver} from 'pkg-tests-core'; | ||
|
||
const {fs: {makeFakeBinary}} = require(`pkg-tests-core`); | ||
|
||
module.exports = (makeTemporaryEnv: PackageDriver) => { | ||
describe(`Scripts tests`, () => { | ||
test( | ||
`it should run scripts using the same Node than the one used by Yarn`, | ||
makeTemporaryEnv({scripts: {myScript: `node --version`}}, async ({path, run, source}) => { | ||
await makeFakeBinary(`${path}/bin/node`); | ||
|
||
await expect(run(`run`, `myScript`)).resolves.toMatchObject({ | ||
stdout: `${process.version}\n`, | ||
}); | ||
}), | ||
); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters