Skip to content

Commit

Permalink
Fix segmentation fault with test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
cahamilton committed Dec 15, 2023
1 parent ddb32a9 commit 90c51fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
14 changes: 8 additions & 6 deletions __tests__/generate.test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/** @format */

const generate = require('../generate');
const proxyquire = require('proxyquire');

jest.mock('css-property-sort-order-smacss', () => ({
groupA: [['prop1', 'prop2'], ['prop3']],
groupB: ['prop4', 'prop5', 'prop6', 'prop7'],
groupC: [['prop8', 'prop9', 'prop10']],
}));
const generate = proxyquire.noCallThru().load('../generate', {
'css-property-sort-order-smacss': {
groupA: [['prop1', 'prop2'], ['prop3']],
groupB: ['prop4', 'prop5', 'prop6', 'prop7'],
groupC: [['prop8', 'prop9', 'prop10']],
},
});

describe('generate options', () => {
it('should correctly group properties', () => {
Expand Down
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @format */

module.exports = {
runner: 'jest-light-runner',
cacheDirectory: '/tmp/jest/',
collectCoverage: true,
coverageDirectory: 'coverage',
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.25.2",
"jest": "^29.0.1",
"jest-light-runner": "^0.6.0",
"prettier": "^3.0.0",
"proxyquire": "^2.0.0",
"stylelint": "^14.0.0 || ^15.0.0 || ^16.0.0"
},
"peerDependencies": {
Expand Down

0 comments on commit 90c51fd

Please sign in to comment.