mirror of https://github.com/grpc/grpc-node.git
Make grpc-js tests run on Node 8.11.2
This commit is contained in:
parent
14cf37fdd9
commit
aa9d47da14
|
|
@ -72,10 +72,12 @@ gulp.task('copy-test-fixtures', 'Copy test fixtures.', () => {
|
||||||
* Transpiles src/ and test/, and then runs all tests.
|
* Transpiles src/ and test/, and then runs all tests.
|
||||||
*/
|
*/
|
||||||
gulp.task('test', 'Runs all tests.', ['copy-test-fixtures'], () => {
|
gulp.task('test', 'Runs all tests.', ['copy-test-fixtures'], () => {
|
||||||
if (semver.satisfies(process.version, '>=9.4')) {
|
if (semver.satisfies(process.version, '^8.11.2 || >=9.4')) {
|
||||||
return gulp.src(`${outDir}/test/**/*.js`)
|
return gulp.src(`${outDir}/test/**/*.js`)
|
||||||
.pipe(mocha({reporter: 'mocha-jenkins-reporter'}));
|
.pipe(mocha({reporter: 'mocha-jenkins-reporter',
|
||||||
|
require: ['ts-node/register']}));
|
||||||
} else {
|
} else {
|
||||||
console.log(`Skipping grpc-js tests for Node ${process.version}`);
|
console.log(`Skipping grpc-js tests for Node ${process.version}`);
|
||||||
|
return Promise.resolve(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ gulp.task('test', 'Run API-level tests', () => {
|
||||||
.on('error', reject);
|
.on('error', reject);
|
||||||
});
|
});
|
||||||
var runTestsArgPairs;
|
var runTestsArgPairs;
|
||||||
if (semver.satisfies(process.version, '>=9.4')) {
|
if (semver.satisfies(process.version, '^ 8.11.2 || >=9.4')) {
|
||||||
runTestsArgPairs = [
|
runTestsArgPairs = [
|
||||||
['native', 'native'],
|
['native', 'native'],
|
||||||
['native', 'js'],
|
['native', 'js'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue