diff --git a/.circleci/config.yml b/.circleci/config.yml index c1935773ca..3a487e4a24 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -53,7 +53,7 @@ jobs: - persist_to_workspace: root: ~/project paths: - - nuxt + - nuxt/test/fixtures test: <<: *defaults @@ -62,7 +62,18 @@ jobs: at: ~/project - run: name: Test - command: yarn jest test/ + command: yarn test:unit + environment: + - NODE_ENV: "test" + + test-e2e: + <<: *defaults + steps: + - attach_workspace: + at: ~/project + - run: + name: Test (e2e) + command: yarn test:e2e environment: - NODE_ENV: "test" @@ -98,8 +109,13 @@ workflows: requires: - build + - test-e2e: + requires: + - build + - release: requires: - build - lint - test + - test-e2e diff --git a/jest.config.js b/jest.config.js index 7f69c4dbe0..d434b79a41 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,5 @@ module.exports = { 'testEnvironment': 'node', 'coverageDirectory': './coverage/', - 'setupTestFrameworkScriptFile': './test/utils/setup', - 'testMatch': [ - '/test/*.test.js' - ] + 'setupTestFrameworkScriptFile': './test/utils/setup' } diff --git a/package.json b/package.json index 9bd0be630d..d60dd165df 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "scripts": { "test": "npm run build-fixtures && npm run test:unit", "build-fixtures": "node ./scripts/build-fixtures", - "test:unit": "jest --maxWorkers=2", + "test:unit": "jest --maxWorkers=4 test/*.test.js", + "test:e2e": "jest --maxWorkers=1 test/e2e/*.test.js", "coverage": "codecov", "lint": "eslint --ext .js,.mjs,.vue bin/* build/ lib/ test/ examples/", "precommit": "npm run lint", diff --git a/test/basic.browser.test.js b/test/e2e/basic.browser.test.js similarity index 100% rename from test/basic.browser.test.js rename to test/e2e/basic.browser.test.js diff --git a/test/children.patch.browser.test.js b/test/e2e/children.patch.browser.test.js similarity index 100% rename from test/children.patch.browser.test.js rename to test/e2e/children.patch.browser.test.js