Merge pull request #255 from babel/2.0-update-smoke

Update smoke-test
This commit is contained in:
Henry Zhu 2017-04-07 17:22:56 -04:00 committed by GitHub
commit 88f18f5482
2 changed files with 9 additions and 7 deletions

View File

@ -38,4 +38,4 @@ matrix:
- node_js: "node"
env: SMOKE_TEST=true PKG_CMD="npm"
after_success: 'if [ -z "${LINT-}" ] && [ -z "${DATA_CHECK-}" && [ -z "${SMOKE_TEST-}" ]; then npm run coverage-ci ; fi'
after_success: 'if [ -z "${LINT-}" ] && [ -z "${DATA_CHECK-}" ] && [ -z "${SMOKE_TEST-}" ]; then npm run coverage-ci ; fi'

View File

@ -13,7 +13,7 @@ try {
execSync("npm pack");
console.log("Setting up smoke test");
fs.ensureDir(tempFolderPath);
fs.ensureDirSync(tempFolderPath);
fs.writeFileSync(
path.join(tempFolderPath, "package.json"),
@ -30,7 +30,7 @@ try {
"babel-preset-env": "${packPath}"
}
}
`
`
);
fs.writeFileSync(
@ -44,15 +44,16 @@ try {
}]
]
}
`
`
);
fs.writeFileSync(
path.join(tempFolderPath, "index.js"),
`
import "babel-polyfill";
1 ** 2;
`
const foo = new Promise((resolve) => {
resolve(new Map());
});
`
);
process.chdir(tempFolderPath);
@ -60,6 +61,7 @@ import "babel-polyfill";
console.log("Running smoke test");
execSync("npm install && npm run build");
} catch (e) {
console.log(e);
errorOccurred = true;
}