Skip to content

Commit

Permalink
Merge branch 'dev' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Jun 22, 2022
2 parents 5e33eb4 + d733e30 commit ffddc9d
Show file tree
Hide file tree
Showing 115 changed files with 31,800 additions and 23,568 deletions.
10 changes: 5 additions & 5 deletions .github/CONTRIBUTING.md
Expand Up @@ -64,11 +64,11 @@ bug if it ever happens again. This prevents regressions from sneaking in.
Tips for a faster workflow:

- Run `npm start` in one terminal. This watches the source tree and compiles it incrementally.
- When desired, run `npm run unit-test` in another terminal. This runs tests using the compilation output from `npm start`.
- Run `npm run unit-test:debug` to use headful DevTools to debug or develop tests
- For testing specific a package, use `--package` flag, e.g., `npm run unit-test -- --package=@pixi/math`
- The `--package` flag supports multiple packages, e.g., `npm run unit-test -- --package=@pixi/math --package=@pixi/core`
- The `--package` flag supports debug testing as well, e.g., `npm run unit-test:debug -- --package=@pixi/math`
- When desired, run `npm run test` in another terminal. This runs tests using the compilation output from `npm start`.
- Run `npm run test:debug` to use headful DevTools to debug or develop tests
- For testing specific a package, use `npm run test:pkg` with the `--packages` flag, e.g., `npm run test:pkg -- --packages=@pixi/math`
- The `--packages` flag supports multiple packages, e.g., `npm run test:pkg -- --packages=@pixi/math @pixi/core`
- Run `npm run test:pkg:debug` for debugging specific packages `npm run test:pkg:debug -- --packages=@pixi/math @pixi/core`

### Submitting Your Change

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Run Unit Tests
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm run coverage:ci
run: npm run coverage
env:
NODE_ENV: production

Expand Down
1 change: 1 addition & 0 deletions .npmrc
@@ -1 +1,2 @@
engine-strict = true
legacy-peer-deps
3 changes: 3 additions & 0 deletions global.d.ts
@@ -1,3 +1,6 @@
// eslint-disable-next-line spaced-comment
/// <reference types="jest-extended" />

declare module '*.frag' {
const value: string;

Expand Down
32 changes: 32 additions & 0 deletions jest.config.js
@@ -0,0 +1,32 @@
module.exports = {
testPathIgnorePatterns: ['/node_modules/', '/src/', '/dist/', '/lib/'],
preset: 'ts-jest/presets/js-with-ts',
runner: 'jest-electron/runner',
testEnvironment: 'jest-electron/environment',
setupFilesAfterEnv: [
'jest-extended/all',
],
transform: {
'\\.vert$': 'jest-raw-loader',
'\\.frag$': 'jest-raw-loader',
},
moduleNameMapper: {
'^@pixi/(.*)$': '<rootDir>/packages/$1/src',
},
testMatch: ['**/?(*.)+(spec|tests).[tj]s?(x)'],
globals: {
'ts-jest': {
tsconfig: {
module: 'ESNext',
esModuleInterop: true,
},
diagnostics: false,
},
},
collectCoverageFrom: [
'<rootDir>/packages/**/*.ts',
'!<rootDir>/packages/**/*.d.ts',
'!<rootDir>/packages/polyfill/**/*.ts',
],
coverageDirectory: '<rootDir>/dist/coverage',
};

0 comments on commit ffddc9d

Please sign in to comment.