Skip to content

Commit

Permalink
stabilize-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-bompart committed Mar 7, 2024
1 parent f01fc9a commit 139be70
Show file tree
Hide file tree
Showing 8 changed files with 34,775 additions and 36,298 deletions.
71,012 changes: 34,745 additions & 36,267 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/atomic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@stencil/react-output-target": "0.5.3",
"@types/dompurify": "3.0.5",
"@types/escape-html": "1.0.4",
"@types/jest": "27.5.2",
"@types/jest": "29.5.12",
"@types/lodash": "4.14.202",
"@types/postcss-import": "14.0.3",
"@types/puppeteer": "5.4.7",
Expand All @@ -86,9 +86,9 @@
"cypress-repeat": "2.3.4",
"cypress-split": "1.5.0",
"html-loader-jest": "0.2.1",
"jest": "27.5.1",
"jest-cli": "27.5.1",
"jest-environment-node": "27.5.1",
"jest": "29.7.0",
"jest-cli": "29.7.0",
"jest-environment-node": "29.7.0",
"jest-localstorage-mock": "2.4.26",
"lit-html": "3.1.2",
"lodash": "4.17.21",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import {getAttributesFromLinkSlot} from './attributes-slot';

describe('getAttributesFromLinkSlot', () => {
beforeEach(() => {
spyOn(console, 'warn');
jest.spyOn(console, 'warn');
});

afterEach(() => {
jest.resetAllMocks();
});

it('retrieves attributes from child slot correctly without warnings', () => {
Expand All @@ -23,7 +27,7 @@ describe('getAttributesFromLinkSlot', () => {
_name: 'target',
_value: '_self',
});
expect(console.warn).not.toBeCalled();
expect(console.warn).not.toHaveBeenCalled();
});

it('returns undefined when there is no slot of that name', () => {
Expand All @@ -45,7 +49,7 @@ describe('getAttributesFromLinkSlot', () => {
host.appendChild(link);
const attributes = getAttributesFromLinkSlot(host, slotName);
expect(attributes).toBeUndefined();
expect(console.warn).toBeCalledTimes(1);
expect(console.warn).toHaveBeenCalledTimes(1);
});

it('logs a warning when the "href" is defined & filters it out', () => {
Expand All @@ -58,6 +62,6 @@ describe('getAttributesFromLinkSlot', () => {
host.appendChild(link);
const attributes = getAttributesFromLinkSlot(host, slotName);
expect(attributes).toEqual([]);
expect(console.warn).toBeCalledTimes(1);
expect(console.warn).toHaveBeenCalledTimes(1);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`Search Layout #buildSearchLayout when the atomic-search-layout componen
"atomic-search-layout#abc { display: grid }
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"search\\"] {
atomic-search-layout#abc atomic-layout-section[section="search"] {
justify-self: start;
width: 80%;
}
Expand All @@ -28,13 +28,13 @@ exports[`Search Layout #buildSearchLayout when the atomic-search-layout componen
'. atomic-section-facets . .';
}
atomic-search-interface:not(.atomic-search-interface-no-results, .atomic-search-interface-error) atomic-search-layout#abc atomic-layout-section[section=\\"facets\\"] {
atomic-search-interface:not(.atomic-search-interface-no-results, .atomic-search-interface-error) atomic-search-layout#abc atomic-layout-section[section="facets"] {
display: block;
}
}
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"horizontal-facets\\"] > atomic-popover:not(.atomic-hidden) {
atomic-search-layout#abc atomic-layout-section[section="horizontal-facets"] > atomic-popover:not(.atomic-hidden) {
display: block;
}
}"
Expand All @@ -45,28 +45,28 @@ exports[`Search Layout #buildSearchLayout when the atomic-search-layout componen
"atomic-search-layout#abc { display: grid }
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"search\\"] {
atomic-search-layout#abc atomic-layout-section[section="search"] {
justify-self: start;
width: 80%;
}
}
atomic-search-layout#abc atomic-layout-section[section=\\"status\\"] atomic-sort-dropdown {
atomic-search-layout#abc atomic-layout-section[section="status"] atomic-sort-dropdown {
display: none;
}
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"status\\"] atomic-sort-dropdown {
atomic-search-layout#abc atomic-layout-section[section="status"] atomic-sort-dropdown {
display: block;
}
atomic-search-layout#abc atomic-layout-section[section=\\"status\\"] atomic-refine-toggle {
atomic-search-layout#abc atomic-layout-section[section="status"] atomic-refine-toggle {
display: none;
}
}
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"horizontal-facets\\"] > atomic-popover:not(.atomic-hidden) {
atomic-search-layout#abc atomic-layout-section[section="horizontal-facets"] > atomic-popover:not(.atomic-hidden) {
display: block;
}
}"
Expand All @@ -77,14 +77,14 @@ exports[`Search Layout #buildSearchLayout when the atomic-search-layout componen
"atomic-search-layout#abc { display: grid }
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"search\\"] {
atomic-search-layout#abc atomic-layout-section[section="search"] {
justify-self: start;
width: 80%;
}
}
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"horizontal-facets\\"] > atomic-popover:not(.atomic-hidden) {
atomic-search-layout#abc atomic-layout-section[section="horizontal-facets"] > atomic-popover:not(.atomic-hidden) {
display: block;
}
}"
Expand All @@ -95,7 +95,7 @@ exports[`Search Layout #buildSearchLayout when the atomic-search-layout has cust
"atomic-search-layout#abc { display: grid }
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"search\\"] {
atomic-search-layout#abc atomic-layout-section[section="search"] {
justify-self: start;
width: 80%;
}
Expand All @@ -118,13 +118,13 @@ exports[`Search Layout #buildSearchLayout when the atomic-search-layout has cust
'. atomic-section-facets . .';
}
atomic-search-interface:not(.atomic-search-interface-no-results, .atomic-search-interface-error) atomic-search-layout#abc atomic-layout-section[section=\\"facets\\"] {
atomic-search-interface:not(.atomic-search-interface-no-results, .atomic-search-interface-error) atomic-search-layout#abc atomic-layout-section[section="facets"] {
display: block;
}
}
@media only screen and (min-width: 1024px) {
atomic-search-layout#abc atomic-layout-section[section=\\"horizontal-facets\\"] > atomic-popover:not(.atomic-hidden) {
atomic-search-layout#abc atomic-layout-section[section="horizontal-facets"] > atomic-popover:not(.atomic-hidden) {
display: block;
}
}"
Expand Down
2 changes: 1 addition & 1 deletion packages/atomic/src/utils/initialization-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ describe('BindStateToController decorator', () => {
});

it('should subscribe to the controller', () => {
spyOn(controller, 'subscribe');
jest.spyOn(controller, 'subscribe');
BindStateToController('controller')(component, 'controllerState');
component.initialize!();

Expand Down
2 changes: 1 addition & 1 deletion packages/atomic/src/utils/result-utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('buildStringTemplateFromResult', () => {
});

it('should snip out objects that cannot be evaluated properly and log a warning', () => {
spyOn(engine.logger, 'warn');
jest.spyOn(engine.logger, 'warn');
expect(
buildStringTemplateFromResult(
'${title}/${raw.notafield}',
Expand Down
2 changes: 1 addition & 1 deletion packages/atomic/svg.transform.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
process() {
return 'module.exports = {};';
return {code: 'module.exports = {};'};
},
getCacheKey() {
// The output is always the same.
Expand Down
9 changes: 2 additions & 7 deletions scripts/reports/title/verify-title.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import _lint from '@commitlint/lint';
import _load from '@commitlint/load';
import lint from '@commitlint/lint';
import load from '@commitlint/load';
import {getPullRequestTitle} from '../github-client.mjs';

/** @type {import('@commitlint/lint').default} */
const lint = _lint['default'];
/** @type {import('@commitlint/load').default} */
const load = _load['default'];

const specUrl = 'https://www.conventionalcommits.org/en/v1.0.0/#summary';

async function analyze(title) {
Expand Down

0 comments on commit 139be70

Please sign in to comment.