diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 19e23bea..2934db89 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -39,18 +39,19 @@ jobs: key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }} restore-keys: | ${{ runner.os }}-yarn- - - name: npm install, unit test and build - run: | - node --version - npm --version - yarn --version - yarn --frozen-lockfile - yarn bootstrap - yarn test:ci - yarn build:demo + - name: log versions + run: node --version && npm --version && yarn --version + - name: install dependecies + run: yarn --frozen-lockfile && yarn bootstrap + - name: run unit tests + run: yarn test:ci env: CI: true NODE_OPTIONS: --max-old-space-size=4096 + - name: build demo site + run: yarn build:demo + env: + NODE_OPTIONS: --max-old-space-size=4096 - uses: actions/upload-artifact@master with: name: dev-test-website-${{ runner.os }}-node-${{ matrix.node-version }} diff --git a/setupTestFramework.js b/setupTestFramework.js index 5df44bc0..e9ee3a78 100644 --- a/setupTestFramework.js +++ b/setupTestFramework.js @@ -4,6 +4,13 @@ import fetch from 'node-fetch'; import * as emotion from 'emotion'; import { createSerializer } from 'jest-emotion'; +jest.mock('path', () => { + const actual = jest.requireActual('path'); + return { + ...actual.posix, + }; +}); + window.fetch = fetch; window.URL.createObjectURL = jest.fn(); expect.addSnapshotSerializer(createSerializer(emotion));