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 language: node_js
node_js: node_js:
- '12' - '12'
env: env:
matrix: - NODE_ENV=test
- TEST_TYPE=ci
- NODE_ENV=test
branches:
only:
- master
install: install:
- yarn install - yarn install
script: script:
- yarn run lint - yarn lint
- yarn test

View File

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