Skip to content

Commit

Permalink
Merge branch 'main' into showAlert-promise
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesDoberer authored Jan 27, 2025
2 parents 40f2610 + 98ab629 commit 467100a
Show file tree
Hide file tree
Showing 13 changed files with 2,733 additions and 3,755 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
describe('Compound Container Tests', () => {
describe('LuigiClient API - LuigiCompoundContainer', () => {
const containerSelector = '[data-test-id="luigi-client-api-test-compound-01"]';
let consoleLog;
let consoleInfo;
let stub;

beforeEach(() => {
cy.visit('http://localhost:8080/compound/compoundClientAPI.html', {
onBeforeLoad(win) {
// Set up a spy on console.log
cy.stub(win.console, 'log', (value) => {
consoleLog = value;
// Clear logs in window console
if (Object.prototype.toString.call(win.console.clear) === '[object Function]') {
win.console.clear();
}

// Set up a spy on console.info
cy.stub(win.console, 'info', (value) => {
consoleInfo = value;
});
}
});
Expand Down Expand Up @@ -290,7 +295,7 @@ describe('Compound Container Tests', () => {

cy.should(() => {
expect(stub.getCall(0)).to.be.calledWith('custom-message: sendInput');
expect(consoleLog).to.equal('dataConverter(): Received Custom Message from "input1" MF My own event data');
expect(consoleInfo).to.equal('dataConverter(): Received Custom Message from "input1" MF My own event data');
});
});

Expand Down
2 changes: 1 addition & 1 deletion container/test-app/compound/compoundClientAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h3>
name: 'sendInput',
action: 'update',
dataConverter: (data) => {
console.log(
console.info(
'dataConverter(): Received Custom Message from "input1" MF ' + data,
);
return 'new text: ' + data;
Expand Down
17 changes: 0 additions & 17 deletions core/babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions core/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
},
"loose": true
}
]
]
}
23 changes: 14 additions & 9 deletions core/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module.exports = async () => {
return {
verbose: true,
testEnvironment: 'jsdom',
roots: ['test'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,mjs,ts,svelte}', '!**/node_modules/**', '!**/vendor/**', '!**/*.spec.{js,ts}']
};
};
/** @type {import('jest').Config} */
const config = {
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{js,mjs,ts,svelte}', '!**/node_modules/**', '!**/vendor/**', '!**/*.spec.{js,ts}'],
roots: ['test'],
testEnvironment: 'jsdom',
transform: {
'\\.[jt]sx?$': 'babel-jest'
},
transformIgnorePatterns: ['/node_modules/(?!(svelte)/)'],
verbose: true
};

module.exports = config;
Loading

0 comments on commit 467100a

Please sign in to comment.