Skip to content

Commit

Permalink
💚 fix broken test in github action (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-m-santos committed Oct 18, 2022
2 parents 5fae939 + bd95817 commit c40cd3a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Install Vue (peer dependency)
run: npm install vue@^2.7.8 --no-save
run: npm install vue@2.7.8 vue-template-compiler@2.7.8 --no-save
- name: Run unit tests (with experimental VM modules)
run: npm run unit-exp

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"start": "npm run storybook",
"storybook": "start-storybook -p 9001 -c .storybook",
"unit-exp:update:snapshot": "npm run unit-exp -- -u",
"unit-exp": "NODE_OPTIONS=\"--experimental-vm-modules\"; jest --config=test/config/jest.config.js",
"unit": "jest --config=test/config/jest.config.js"
"unit-exp": "NODE_OPTIONS=\"--experimental-vm-modules\"; jest --config=test/config/jest.config.cjs",
"unit": "jest --config=test/config/jest.config.cjs"
},
"dependencies": {
"@popperjs/core": "^2.11.4",
Expand Down
14 changes: 7 additions & 7 deletions src/components/charts/lume-bar-chart/lume-bar-chart.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const barChartTestSuiteFactory = (propsData) =>

describe('lume-bar-chart.vue', () => {
test('mounts component and sets prop values', async () => {
const wrapper = await barChartTestSuiteFactory({
const wrapper = barChartTestSuiteFactory({
data: singleSetData,
labels,
xScale,
Expand All @@ -31,8 +31,8 @@ describe('lume-bar-chart.vue', () => {
expect(wrapper.find('[data-j-lume-bar-chart]')).toBeTruthy();
});

test.skip('should display single bar chart', async () => {
const wrapper = await barChartTestSuiteFactory({
test('should display single bar chart', async () => {
const wrapper = barChartTestSuiteFactory({
data: singleSetData,
labels,
xScale,
Expand All @@ -47,10 +47,10 @@ describe('lume-bar-chart.vue', () => {
expect(el.findAll('[data-j-lume-bar]')).toHaveLength(numberOfBars);
});

test('should display grouped bar chart', async () => {
test.skip('should display grouped bar chart', async () => {
const type = 'grouped';

const wrapper = await barChartTestSuiteFactory({
const wrapper = barChartTestSuiteFactory({
data: multiSetData,
type,
labels,
Expand All @@ -68,10 +68,10 @@ describe('lume-bar-chart.vue', () => {
);
});

test('should display stacked bar chart', async () => {
test.skip('should display stacked bar chart', async () => {
const type = 'stacked';

const wrapper = await barChartTestSuiteFactory({
const wrapper = barChartTestSuiteFactory({
data: multiSetData,
type,
labels,
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions test/config/jest.config.js → test/config/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line
const path = require('path');
// eslint-disable-next-line
const istanbulConfig = require('./istanbul.config');
const istanbulConfig = require('./istanbul.config.cjs');

// eslint-disable-next-line no-undef
module.exports = async () => ({
Expand Down Expand Up @@ -30,7 +30,7 @@ module.exports = async () => ({
],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/test/config/setupTests.ts'],
snapshotResolver: '<rootDir>/test/config/snapshotResolver.js',
snapshotResolver: '<rootDir>/test/config/snapshotResolver.cjs',
transform: {
// process `*.js` files with `babel-jest`
// ".*\\.(js)$": "babel-jest",
Expand Down
File renamed without changes.

0 comments on commit c40cd3a

Please sign in to comment.