diff --git a/nix/scripts/run-ci-tests.nix b/nix/scripts/run-ci-tests.nix index f5cf83f4a7b02f2dfb2e7859c97739558e757a74..2ebb3a8a3f8df203ad699d763ac9bb61afeea7f1 100644 --- a/nix/scripts/run-ci-tests.nix +++ b/nix/scripts/run-ci-tests.nix @@ -15,9 +15,6 @@ 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 "The command is executed in the current working directory and not in a nix derivation." diff --git a/test/cases/data/transformer.mjs b/test/cases/data/transformer.mjs index d5c26d0eb8348d5c2b6a1276660e86a1da060566..c6ab31ee23c2f3d0fa21ce7ed0942797cbe51cb5 100644 --- a/test/cases/data/transformer.mjs +++ b/test/cases/data/transformer.mjs @@ -2,6 +2,7 @@ import {expect} from "chai" import {Transformer} from "../../../source/data/transformer.mjs"; +import {getLocaleOfDocument} from "../../../source/dom/locale.mjs"; import {Embed} from "../../../source/i18n/providers/embed.mjs"; import {initJSDOM} from "../../util/jsdom.mjs"; @@ -194,11 +195,25 @@ describe('Transformer', function () { ].forEach(function (data) { + let a = data.shift() let b = data.shift() let c = data.shift() 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); t.setCallback('testcallback', function (a, b, c, d) { @@ -206,7 +221,7 @@ describe('Transformer', function () { }); 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)); }); });