Skip to content
Snippets Groups Projects
Verified Commit 02b693ba authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

fix: wip new pipeline

parent 2eacf8e9
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,6 @@ ...@@ -15,9 +15,6 @@
cd ''${CI_PROJECT_DIR} || exit 1 cd ''${CI_PROJECT_DIR} || exit 1
${pkgs.eza}/bin/eza -T -L2
echo "This script will run tests in the project working directory: ''${CI_PROJECT_DIR}" echo "This script will run tests in the project working directory: ''${CI_PROJECT_DIR}"
echo "The command is executed in the current working directory and not in a nix derivation." echo "The command is executed in the current working directory and not in a nix derivation."
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import {expect} from "chai" import {expect} from "chai"
import {Transformer} from "../../../source/data/transformer.mjs"; import {Transformer} from "../../../source/data/transformer.mjs";
import {getLocaleOfDocument} from "../../../source/dom/locale.mjs";
import {Embed} from "../../../source/i18n/providers/embed.mjs"; import {Embed} from "../../../source/i18n/providers/embed.mjs";
import {initJSDOM} from "../../util/jsdom.mjs"; import {initJSDOM} from "../../util/jsdom.mjs";
...@@ -194,11 +195,25 @@ describe('Transformer', function () { ...@@ -194,11 +195,25 @@ describe('Transformer', function () {
].forEach(function (data) { ].forEach(function (data) {
let a = data.shift() let a = data.shift()
let b = data.shift() let b = data.shift()
let c = data.shift() let c = data.shift()
it('Transformer.run(' + JSON.stringify(a) + ').run(' + JSON.stringify(b) + ') should return ' + JSON.stringify(c), function () { it('Transformer.run(' + JSON.stringify(a) + ').run(' + JSON.stringify(b) + ') should return ' + JSON.stringify(c), function () {
const options = {
dateStyle: "medium",
timeStyle: "medium"
};
let locale = getLocaleOfDocument();
console.log(locale,'localelocalelocalelocalelocale')
const intl= new Intl.DateTimeFormat("de", options).format(new Date("2023-02-04 08:02:01"));
console.log(intl,'intl')
let t = new Transformer(a); let t = new Transformer(a);
t.setCallback('testcallback', function (a, b, c, d) { t.setCallback('testcallback', function (a, b, c, d) {
...@@ -206,7 +221,7 @@ describe('Transformer', function () { ...@@ -206,7 +221,7 @@ describe('Transformer', function () {
}); });
const r = t.run(b); const r = t.run(b);
expect(r).to.be.eql(c, "Transformer.run(" + JSON.stringify(a) + ").run(" + JSON.stringify(b) + ") should return " + JSON.stringify(c)); expect(c).to.be.eql(r, "Transformer.run(" + JSON.stringify(a) + ").run(" + JSON.stringify(b) + ") should return " + JSON.stringify(c));
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment