test: fix babel-preset-gatsby error in travisci

This commit is contained in:
afc163 2019-11-22 17:05:22 +08:00
parent 92947967fc
commit 94a0cb9093
2 changed files with 11 additions and 10 deletions

View File

@ -1,15 +1,14 @@
sudo: false
language: node_js
node_js:
- '12'
- '12'
env:
matrix:
- TEST_TYPE=ci
- NODE_ENV=test
branches:
only:
- master
- NODE_ENV=test
install:
- yarn install
- yarn install
script:
- yarn run lint
- yarn lint
- yarn test

View File

@ -5,6 +5,7 @@ module.exports = api => {
const isCommonJS = api.env('cjs');
const isESModule = api.env('esm');
const isTest = api.env('test');
if (process.env.GATSBY === 'true') { //
return {
presets: [
@ -33,6 +34,7 @@ module.exports = api => {
]
};
}
return {
presets: [
[