Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Monster
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSS
Libraries
Javascript
Monster
Commits
02b693ba
Verified
Commit
02b693ba
authored
1 year ago
by
Volker Schukai
Browse files
Options
Downloads
Patches
Plain Diff
fix: wip new pipeline
parent
2eacf8e9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
nix/scripts/run-ci-tests.nix
+0
-3
0 additions, 3 deletions
nix/scripts/run-ci-tests.nix
test/cases/data/transformer.mjs
+16
-1
16 additions, 1 deletion
test/cases/data/transformer.mjs
with
16 additions
and
4 deletions
nix/scripts/run-ci-tests.nix
+
0
−
3
View file @
02b693ba
...
@@ -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."
...
...
This diff is collapsed.
Click to expand it.
test/cases/data/transformer.mjs
+
16
−
1
View file @
02b693ba
...
@@ -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
));
});
});
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment