Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,389 changes: 788 additions & 601 deletions package-lock.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { shallow } from 'enzyme';
import { render, screen } from '@testing-library/react';

import CustomTaskList from '../CustomTaskList/CustomTaskList';

Expand All @@ -9,7 +9,7 @@ describe('CustomTaskListComponent', () => {
isOpen: true,
dismissBar: () => undefined,
};
const wrapper = shallow(<CustomTaskList {...props} />);
const wrapper = render(<CustomTaskList {...props} />);
expect(wrapper.render().text()).toMatch('This is a dismissible demo component');
});
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { shallow } from 'enzyme';
import { render, screen } from '@testing-library/react';

import CustomTaskList from '../CustomTaskList/CustomTaskList';

Expand All @@ -9,7 +9,7 @@ describe('CustomTaskListComponent', () => {
isOpen: true,
dismissBar: () => undefined,
};
const wrapper = shallow(<CustomTaskList {...props} />);
const wrapper = render(<CustomTaskList {...props} />);
expect(wrapper.render().text()).toMatch('This is a dismissible demo component');
});
});
1 change: 0 additions & 1 deletion packages/flex-plugin-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"querystring": "^0.2.1"
},
"devDependencies": {
"@types/enzyme": "^3.10.10",
"@types/jest": "^27.0.0",
"@types/node": "^14.17.18"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/flex-plugin-scripts/src/scripts/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const _parseArgs = (...args: string[]): { jestEnv: string; cleanArgs: str
* Runs Jest tests
*/
const test = async (...args: string[]): Promise<void> => {
logger.debug('Running tests');
logger.debug('Running tests with local CLI');

addCWDNodeModule();

Expand All @@ -72,7 +72,7 @@ const test = async (...args: string[]): Promise<void> => {
const { jestEnv, cleanArgs } = _parseArgs(...args);

logger.clearTerminal();
logger.notice('Running tests...');
logger.notice('Running tests with local cli...');

// We run this as a separate module here so that we don't have to import optional `jest` module if not needed
// eslint-disable-next-line @typescript-eslint/no-var-requires, global-require, @typescript-eslint/no-require-imports
Expand Down
14 changes: 4 additions & 10 deletions packages/flex-plugin-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,17 @@
"dependencies": {
"@babel/core": "^7.16.0",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@testing-library/dom": "10.4.0",
"@testing-library/react": "16.3.0",
"@twilio/flex-dev-utils": "7.1.1",
"babel-jest": "^27.0.0",
"babel-polyfill": "^6.26.0",
"babel-preset-react-app": "^10.0.1",
"cheerio": "1.0.0-rc.12",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1",
"jest": "^27.0.0",
"jest-environment-jsdom": "^27.0.0",
"jest-watch-typeahead": "^0.6.4",
"react": "^16",
"react-app-polyfill": "^1.0.6",
"react-dom": "^16",
"react-test-renderer": "^16"
},
"resolutions": {
"cheerio": "1.0.0-rc.12"
"jsdom": "26.1.0",
"react-app-polyfill": "^1.0.6"
},
"devDependencies": {
"@jest/types": "^27.0.0"
Expand Down
9 changes: 1 addition & 8 deletions packages/flex-plugin-test/templates/setupTests.js
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
require('babel-polyfill');

const configure = require('enzyme/build').configure;
const Adapter = require('enzyme-adapter-react-16/build');

configure({
adapter: new Adapter(),
});
require('babel-polyfill');
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,14 @@ export default class FlexPluginsUpgradePlugin extends FlexPlugin {
'react-app-rewire-flex-plugin',
'react-app-rewired',
'react-scripts',
'enzyme',
'babel-polyfill',
'enzyme-adapter-react-16',
'react-emotion',
'@craco/craco',
'craco-config-flex-plugin',
'core-j',
'react-test-renderer',
'react-scripts',
'rimraf',
'@types/enzyme',
'@types/jest',
'@types/node',
'@types/react',
Expand Down
Loading