Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
enedis_sge_konnector
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
web-et-numerique
Factory
LLLE_Project
enedis_sge_konnector
Merge requests
!9
Feat/insee code
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feat/insee code
feat/insee-code
into
main
Overview
0
Commits
15
Pipelines
5
Changes
12
Merged
Hugo SUBTIL
requested to merge
feat/insee-code
into
main
2 years ago
Overview
0
Commits
15
Pipelines
5
Changes
12
Expand
0
0
Merge request reports
Compare
main
version 4
5e8d8f77
2 years ago
version 3
e60ba22b
2 years ago
version 2
e284ce29
2 years ago
version 1
54f37e40
2 years ago
main (base)
and
latest version
latest version
58baa01c
15 commits,
2 years ago
version 4
5e8d8f77
14 commits,
2 years ago
version 3
e60ba22b
12 commits,
2 years ago
version 2
e284ce29
11 commits,
2 years ago
version 1
54f37e40
10 commits,
2 years ago
12 files
+
266
−
45
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
12
Search (e.g. *.vue) (Ctrl+P)
__tests__/requests/insee.spec.js
0 → 100644
+
22
−
0
Options
const
{
getInseeCode
}
=
require
(
'
../../src/requests/insee
'
)
describe
(
'
getInseeCode
'
,
()
=>
{
it
(
'
should return a valid insee code for Lyon 7
'
,
async
()
=>
{
expect
(
await
getInseeCode
(
69007
)).
toEqual
(
'
69387
'
)
})
it
(
'
should return null for a unexisting post code
'
,
async
()
=>
{
expect
(
await
getInseeCode
(
69069
)).
toEqual
(
null
)
})
it
(
'
should return null for post code 69290 when city is not provided
'
,
async
()
=>
{
expect
(
await
getInseeCode
(
69290
)).
toEqual
(
null
)
})
it
(
'
should return Craponne insee code for post code 69290
'
,
async
()
=>
{
expect
(
await
getInseeCode
(
69290
,
'
CRAPONNE
'
)).
toEqual
(
'
69069
'
)
})
it
(
'
should return Pollionnay insee code for post code 69290
'
,
async
()
=>
{
expect
(
await
getInseeCode
(
69290
,
'
POLLIONNAY
'
)).
toEqual
(
'
69154
'
)
})
})
Loading