@coveord/plasma-mantine 49.2.2 → 49.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +9 -4
- package/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +35 -31
- package/{src/components/code-editor/__mocks__ → __mocks__}/@monaco-editor/react.tsx +6 -8
- package/{src/components/code-editor/__mocks__ → __mocks__}/monaco-editor.ts +0 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/__tests__/Utils.js.map +1 -1
- package/dist/cjs/__tests__/VitestSetup.js +35 -0
- package/dist/cjs/__tests__/VitestSetup.js.map +1 -0
- package/dist/cjs/components/table/Th.js +8 -11
- package/dist/cjs/components/table/Th.js.map +1 -1
- package/dist/definitions/__tests__/Utils.d.ts +1 -1
- package/dist/definitions/__tests__/Utils.d.ts.map +1 -1
- package/dist/definitions/__tests__/VitestSetup.d.ts +2 -0
- package/dist/definitions/__tests__/VitestSetup.d.ts.map +1 -0
- package/dist/definitions/components/table/Th.d.ts.map +1 -1
- package/dist/esm/__tests__/Utils.js +1 -1
- package/dist/esm/__tests__/Utils.js.map +1 -1
- package/dist/esm/__tests__/VitestSetup.js +30 -0
- package/dist/esm/__tests__/VitestSetup.js.map +1 -0
- package/dist/esm/components/table/Th.js +9 -12
- package/dist/esm/components/table/Th.js.map +1 -1
- package/package.json +7 -6
- package/src/__tests__/Utils.tsx +1 -1
- package/src/__tests__/VitestSetup.ts +27 -0
- package/src/components/code-editor/__tests__/CodeEditor.spec.tsx +7 -5
- package/src/components/collection/__tests__/Collection.spec.tsx +2 -2
- package/src/components/date-range-picker/__tests__/DateRangePickerInlineCalendar.spec.tsx +17 -17
- package/src/components/date-range-picker/__tests__/DateRangePickerPopoverCalendar.spec.tsx +11 -7
- package/src/components/date-range-picker/__tests__/DateRangePickerPresetSelect.spec.tsx +1 -1
- package/src/components/inline-confirm/__tests__/InlineConfirm.spec.tsx +6 -6
- package/src/components/modal/__tests__/Modal.spec.tsx +3 -3
- package/src/components/modal-wizard/__tests__/ModalWizard.spec.tsx +8 -8
- package/src/components/prompt/__tests__/Prompt.spec.tsx +2 -2
- package/src/components/table/Th.tsx +9 -7
- package/src/components/table/__tests__/Table.spec.tsx +1 -1
- package/src/components/table/__tests__/TableActions.spec.tsx +1 -1
- package/src/components/table/__tests__/TableDateRangePicker.spec.tsx +11 -8
- package/src/components/table/__tests__/TableFilter.spec.tsx +4 -4
- package/src/components/table/__tests__/TablePagination.spec.tsx +2 -2
- package/src/components/table/__tests__/TablePerPage.spec.tsx +3 -3
- package/src/components/table/__tests__/TablePredicate.spec.tsx +2 -2
- package/src/components/table/__tests__/Th.spec.tsx +6 -15
- package/src/hooks/__tests__/useControlledList.spec.tsx +1 -1
- package/tsconfig.build.json +2 -1
- package/tsconfig.json +3 -2
- package/vitest.config.ts +24 -0
- package/dist/cjs/__tests__/GlobalSetup.js +0 -17
- package/dist/cjs/__tests__/GlobalSetup.js.map +0 -1
- package/dist/cjs/__tests__/Setup.js +0 -6
- package/dist/cjs/__tests__/Setup.js.map +0 -1
- package/dist/cjs/__tests__/SetupAfterEnv.js +0 -19
- package/dist/cjs/__tests__/SetupAfterEnv.js.map +0 -1
- package/dist/cjs/components/code-editor/__mocks__/@monaco-editor/react.js +0 -45
- package/dist/cjs/components/code-editor/__mocks__/@monaco-editor/react.js.map +0 -1
- package/dist/cjs/components/code-editor/__mocks__/monaco-editor.js +0 -24
- package/dist/cjs/components/code-editor/__mocks__/monaco-editor.js.map +0 -1
- package/dist/definitions/__tests__/GlobalSetup.d.ts +0 -3
- package/dist/definitions/__tests__/GlobalSetup.d.ts.map +0 -1
- package/dist/definitions/__tests__/Setup.d.ts +0 -5
- package/dist/definitions/__tests__/Setup.d.ts.map +0 -1
- package/dist/definitions/__tests__/SetupAfterEnv.d.ts +0 -7
- package/dist/definitions/__tests__/SetupAfterEnv.d.ts.map +0 -1
- package/dist/definitions/components/code-editor/__mocks__/@monaco-editor/react.d.ts +0 -10
- package/dist/definitions/components/code-editor/__mocks__/@monaco-editor/react.d.ts.map +0 -1
- package/dist/definitions/components/code-editor/__mocks__/monaco-editor.d.ts +0 -8
- package/dist/definitions/components/code-editor/__mocks__/monaco-editor.d.ts.map +0 -1
- package/dist/esm/__tests__/GlobalSetup.js +0 -7
- package/dist/esm/__tests__/GlobalSetup.js.map +0 -1
- package/dist/esm/__tests__/Setup.js +0 -5
- package/dist/esm/__tests__/Setup.js.map +0 -1
- package/dist/esm/__tests__/SetupAfterEnv.js +0 -15
- package/dist/esm/__tests__/SetupAfterEnv.js.map +0 -1
- package/dist/esm/components/code-editor/__mocks__/@monaco-editor/react.js +0 -24
- package/dist/esm/components/code-editor/__mocks__/@monaco-editor/react.js.map +0 -1
- package/dist/esm/components/code-editor/__mocks__/monaco-editor.js +0 -14
- package/dist/esm/components/code-editor/__mocks__/monaco-editor.js.map +0 -1
- package/jest.config.js +0 -26
- package/src/__tests__/GlobalSetup.ts +0 -5
- package/src/__tests__/Setup.ts +0 -4
- package/src/__tests__/SetupAfterEnv.ts +0 -16
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monaco-editor.d.ts","sourceRoot":"","sources":["../../../../../src/components/code-editor/__mocks__/monaco-editor.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;2BAJE,IAAI;;;CAMxB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/GlobalSetup.ts"],"sourcesContent":["// This file is executed once, before everything else.\nexport default () => {\n // @ts-ignore\n process.env.TZ = 'UTC';\n};\n"],"names":["process","env","TZ"],"mappings":"AAAA,sDAAsD;AACtD,eAAe,WAAM;IACjB,aAAa;IACbA,QAAQC,GAAG,CAACC,EAAE,GAAG;AACrB,EAAE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/Setup.ts"],"sourcesContent":["/**\n * This file is executed once per test file.\n * It is executed before executing SetupAfterEnv and before the test code itself.\n */\n"],"names":[],"mappings":"AAAA;;;CAGC,GAHD"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is executed once per test file.
|
|
3
|
-
* It is executed after executing Setup and Jest is initialised, but before the test code itself.
|
|
4
|
-
*/ import "@testing-library/jest-dom";
|
|
5
|
-
import "@testing-library/jest-dom/extend-expect";
|
|
6
|
-
Element.prototype.scrollTo = jest.fn();
|
|
7
|
-
window.ResizeObserver = window.ResizeObserver || jest.fn().mockImplementation(function() {
|
|
8
|
-
return {
|
|
9
|
-
disconnect: jest.fn(),
|
|
10
|
-
observe: jest.fn(),
|
|
11
|
-
unobserve: jest.fn()
|
|
12
|
-
};
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
//# sourceMappingURL=SetupAfterEnv.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/__tests__/SetupAfterEnv.ts"],"sourcesContent":["/**\n * This file is executed once per test file.\n * It is executed after executing Setup and Jest is initialised, but before the test code itself.\n */\n\nimport '@testing-library/jest-dom';\nimport '@testing-library/jest-dom/extend-expect';\n\nElement.prototype.scrollTo = jest.fn();\nwindow.ResizeObserver =\n window.ResizeObserver ||\n jest.fn().mockImplementation(() => ({\n disconnect: jest.fn(),\n observe: jest.fn(),\n unobserve: jest.fn(),\n }));\n"],"names":["Element","prototype","scrollTo","jest","fn","window","ResizeObserver","mockImplementation","disconnect","observe","unobserve"],"mappings":"AAAA;;;CAGC,GAED,OAAO,4BAA4B;AACnC,OAAO,0CAA0C;AAEjDA,QAAQC,SAAS,CAACC,QAAQ,GAAGC,KAAKC,EAAE;AACpCC,OAAOC,cAAc,GACjBD,OAAOC,cAAc,IACrBH,KAAKC,EAAE,GAAGG,kBAAkB,CAAC;WAAO;QAChCC,YAAYL,KAAKC,EAAE;QACnBK,SAASN,KAAKC,EAAE;QAChBM,WAAWP,KAAKC,EAAE;IACtB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect } from "react";
|
|
3
|
-
var editor = {
|
|
4
|
-
onDidFocusEditorText: jest.fn(),
|
|
5
|
-
onDidBlurEditorText: jest.fn()
|
|
6
|
-
};
|
|
7
|
-
var monaco = jest.fn();
|
|
8
|
-
var MockedEditor = function(props) {
|
|
9
|
-
useEffect(function() {
|
|
10
|
-
props.onMount(editor, monaco);
|
|
11
|
-
}, []);
|
|
12
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
13
|
-
"data-testid": "monaco-editor"
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
export default MockedEditor;
|
|
17
|
-
export var loader = {
|
|
18
|
-
config: jest.fn()
|
|
19
|
-
};
|
|
20
|
-
export var useMonaco = function() {
|
|
21
|
-
return jest.fn();
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=react.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/components/code-editor/__mocks__/@monaco-editor/react.tsx"],"sourcesContent":["import {EditorProps} from '@monaco-editor/react';\nimport {FunctionComponent, useEffect} from 'react';\n\nconst editor: any = {\n onDidFocusEditorText: jest.fn(),\n onDidBlurEditorText: jest.fn(),\n};\n\nconst monaco: any = jest.fn();\n\nconst MockedEditor: FunctionComponent<EditorProps> = (props) => {\n useEffect(() => {\n props.onMount(editor, monaco);\n }, []);\n return <div data-testid=\"monaco-editor\" />;\n};\n\nexport default MockedEditor;\n\nexport const loader = {\n config: jest.fn(),\n};\n\nexport const useMonaco = () => jest.fn();\n"],"names":["useEffect","editor","onDidFocusEditorText","jest","fn","onDidBlurEditorText","monaco","MockedEditor","props","onMount","div","data-testid","loader","config","useMonaco"],"mappings":";AACA,SAA2BA,SAAS,QAAO,QAAQ;AAEnD,IAAMC,SAAc;IAChBC,sBAAsBC,KAAKC,EAAE;IAC7BC,qBAAqBF,KAAKC,EAAE;AAChC;AAEA,IAAME,SAAcH,KAAKC,EAAE;AAE3B,IAAMG,eAA+C,SAACC,OAAU;IAC5DR,UAAU,WAAM;QACZQ,MAAMC,OAAO,CAACR,QAAQK;IAC1B,GAAG,EAAE;IACL,qBAAO,KAACI;QAAIC,eAAY;;AAC5B;AAEA,eAAeJ,aAAa;AAE5B,OAAO,IAAMK,SAAS;IAClBC,QAAQV,KAAKC,EAAE;AACnB,EAAE;AAEF,OAAO,IAAMU,YAAY;WAAMX,KAAKC,EAAE;EAAG"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/code-editor/__mocks__/monaco-editor.ts"],"sourcesContent":["const editor = {\n create: () => ({\n dispose: (): void => null,\n }),\n};\n\nexport const monaco = {\n editor,\n};\n"],"names":["editor","create","dispose","monaco"],"mappings":"AAAA,IAAMA,SAAS;IACXC,QAAQ;eAAO;YACXC,SAAS;uBAAY,IAAI;;QAC7B;;AACJ;AAEA,OAAO,IAAMC,SAAS;IAClBH,QAAAA;AACJ,EAAE"}
|
package/jest.config.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
setupFiles: ['<rootDir>/src/__tests__/Setup.ts'],
|
|
3
|
-
setupFilesAfterEnv: ['<rootDir>/src/__tests__/SetupAfterEnv.ts'],
|
|
4
|
-
globalSetup: '<rootDir>/src/__tests__/GlobalSetup.ts',
|
|
5
|
-
moduleNameMapper: {
|
|
6
|
-
'^@test-utils$': '<rootDir>/src/__tests__/Utils.tsx',
|
|
7
|
-
'^@coveord/plasma-react-icons$': '<rootDir>/node_modules/@coveord/plasma-react-icons/mock',
|
|
8
|
-
},
|
|
9
|
-
testEnvironment: 'jsdom',
|
|
10
|
-
transform: {
|
|
11
|
-
'^.+\\.(t|j)sx?$': [
|
|
12
|
-
'@swc/jest',
|
|
13
|
-
{
|
|
14
|
-
jsc: {
|
|
15
|
-
transform: {
|
|
16
|
-
react: {
|
|
17
|
-
runtime: 'automatic',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
testMatch: ['<rootDir>/src/**/*.spec.{ts,tsx}'],
|
|
25
|
-
modulePathIgnorePatterns: ['<rootDir>/dist/'],
|
|
26
|
-
};
|
package/src/__tests__/Setup.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is executed once per test file.
|
|
3
|
-
* It is executed after executing Setup and Jest is initialised, but before the test code itself.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import '@testing-library/jest-dom';
|
|
7
|
-
import '@testing-library/jest-dom/extend-expect';
|
|
8
|
-
|
|
9
|
-
Element.prototype.scrollTo = jest.fn();
|
|
10
|
-
window.ResizeObserver =
|
|
11
|
-
window.ResizeObserver ||
|
|
12
|
-
jest.fn().mockImplementation(() => ({
|
|
13
|
-
disconnect: jest.fn(),
|
|
14
|
-
observe: jest.fn(),
|
|
15
|
-
unobserve: jest.fn(),
|
|
16
|
-
}));
|