Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e37974b3
Commit
e37974b3
authored
Mar 08, 2020
by
Fabio Huser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate spec/javascripts/locale/ to Jest
Closes gitlab-org/gitlab#194243
parent
c901cb74
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
8 deletions
+4
-8
spec/frontend/locale/index_spec.js
spec/frontend/locale/index_spec.js
+4
-8
No files found.
spec/
javascripts
/locale/index_spec.js
→
spec/
frontend
/locale/index_spec.js
View file @
e37974b3
import
{
createDateTimeFormat
,
languageCode
}
from
'
~/locale
'
;
import
{
setLanguage
}
from
'
../
helpers/locale_helper
'
;
import
{
setLanguage
}
from
'
helpers/locale_helper
'
;
describe
(
'
locale
'
,
()
=>
{
afterEach
(()
=>
{
setLanguage
(
null
);
});
afterEach
(()
=>
setLanguage
(
null
));
describe
(
'
languageCode
'
,
()
=>
{
it
(
'
parses the lang attribute
'
,
()
=>
{
...
...
@@ -22,14 +20,12 @@ describe('locale', () => {
});
describe
(
'
createDateTimeFormat
'
,
()
=>
{
beforeEach
(()
=>
{
setLanguage
(
'
de
'
);
});
beforeEach
(()
=>
setLanguage
(
'
en
'
));
it
(
'
creates an instance of Intl.DateTimeFormat
'
,
()
=>
{
const
dateFormat
=
createDateTimeFormat
({
year
:
'
numeric
'
,
month
:
'
long
'
,
day
:
'
numeric
'
});
expect
(
dateFormat
.
format
(
new
Date
(
2015
,
6
,
3
))).
toBe
(
'
3. Juli
2015
'
);
expect
(
dateFormat
.
format
(
new
Date
(
2015
,
6
,
3
))).
toBe
(
'
July 3,
2015
'
);
});
});
});
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment