ac-countrylist 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ <a name="1.0.7"></a>
2
+
3
+ ## [1.0.7](https://github.com/admiralcloud/ac-countrylist/compare/v1.0.6..v1.0.7) (2022-06-08 18:17:51)
4
+
5
+
6
+ ### Bug Fix
7
+
8
+ * **App:** Changed Turkey to Türkiye | MP | [b1d56db3e8f5cb9d1c6e27c277d0e40df8621caf](https://github.com/admiralcloud/ac-countrylist/commit/b1d56db3e8f5cb9d1c6e27c277d0e40df8621caf)
9
+ Changed Turkey to Türkiye
10
+ Related issues: [undefined/undefined#master](undefined/browse/master)
11
+ ### Chores
12
+
13
+ * **App:** Updated gitignore | MP | [37fd39317aee46af14b497042c94cee1cc6ea01e](https://github.com/admiralcloud/ac-countrylist/commit/37fd39317aee46af14b497042c94cee1cc6ea01e)
14
+ Updated gitignore
15
+ Related issues: [undefined/undefined#master](undefined/browse/master)
16
+ ### Chores
17
+
18
+ * **App:** Updated packages | MP | [6dde63afc641c5a16ba9b2a5b1f5f12e72619e4f](https://github.com/admiralcloud/ac-countrylist/commit/6dde63afc641c5a16ba9b2a5b1f5f12e72619e4f)
19
+ Updated packages
20
+ Related issues: [undefined/undefined#master](undefined/browse/master)
1
21
  <a name="1.0.6"></a>
2
22
 
3
23
  ## [1.0.6](https://github.com/admiralcloud/ac-countrylist/compare/v1.0.5..v1.0.6) (2021-10-09 10:44:02)
package/countrylist.js CHANGED
@@ -11326,10 +11326,11 @@ module.exports = [
11326
11326
  ]
11327
11327
  },
11328
11328
  {
11329
- name: 'Turkey',
11329
+ name: 'Türkiye',
11330
11330
  capital: 'Ankara',
11331
11331
  altSpellings: [
11332
11332
  'TR',
11333
+ 'Turkey',
11333
11334
  'Turkiye',
11334
11335
  'Republic of Turkey',
11335
11336
  'Türkiye Cumhuriyeti'
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "ac-countrylist",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "dependencies": {
5
+ "chai": "^4.3.6",
5
6
  "lodash": "^4.17.21"
6
7
  },
7
8
  "author": "Mark Poepping",
8
9
  "repository": "admiralcloud/ac-countrylist",
9
10
  "license": "MIT",
10
11
  "devDependencies": {
11
- "ac-semantic-release": "^0.2.7",
12
- "eslint": "^7.32.0",
13
- "expect": "^27.2.5",
14
- "mocha": "^9.1.2"
12
+ "ac-semantic-release": "^0.3.0",
13
+ "eslint": "^8.17.0",
14
+ "mocha": "^10.0.0"
15
15
  },
16
16
  "scripts": {
17
17
  "test": "mocha --bail --colors --reporter spec"
package/test/test.js CHANGED
@@ -1,61 +1,73 @@
1
- const expect = require('expect')
1
+ const { expect } = require('chai')
2
2
  const _ = require('lodash')
3
3
  const acCountryList = require('../index')
4
4
 
5
5
  describe('Start tests', () => {
6
6
  it('Fetch list', (done) => {
7
7
  let test = acCountryList.shortList()
8
- expect(test).toHaveLength(249)
8
+ expect(test).to.have.lengthOf(249)
9
9
  return done()
10
10
  })
11
11
 
12
12
  it('Fetch random country', (done) => {
13
13
  let test = _.get(acCountryList.random(), 'name')
14
14
  let list = _.map(acCountryList.shortList(), 'name')
15
- expect(list).toContain(test)
15
+ expect(list).to.include(test)
16
16
  return done()
17
17
  })
18
18
 
19
19
  it('Query ISO2 - DE - should return Germany', (done) => {
20
20
  let test = acCountryList.query({ iso2: 'DE' })
21
- expect(test).toHaveProperty('nativeName', 'Deutschland')
21
+ expect(test).to.have.property('nativeName', 'Deutschland')
22
+ return done()
23
+ })
24
+
25
+ it('Query Türkiye - new spelling as of June 2022', (done) => {
26
+ let test = acCountryList.query({ name: 'Türkiye' })
27
+ expect(test).to.have.property('nativeName', 'Türkiye')
28
+ return done()
29
+ })
30
+
31
+ it('Query Turkey - old spelling of Türkiye - should still work', (done) => {
32
+ let test = acCountryList.query({ name: 'Türkiye' })
33
+ expect(test).to.have.property('nativeName', 'Türkiye')
22
34
  return done()
23
35
  })
24
36
 
25
37
  it('Query ISO3 - LAO - should return Laos', (done) => {
26
38
  let test = acCountryList.query({ iso3: 'LAO' })
27
- expect(test).toHaveProperty('name', 'Laos')
28
- expect(test).toHaveProperty('nativeName', 'ສປປລາວ')
39
+ expect(test).to.have.property('name', 'Laos')
40
+ expect(test).to.have.property('nativeName', 'ສປປລາວ')
29
41
  return done()
30
42
  })
31
43
 
32
44
  it('Query Laos', (done) => {
33
45
  let test = acCountryList.query({ name: 'Laos' })
34
- expect(test).toHaveProperty('nativeName', 'ສປປລາວ')
46
+ expect(test).to.have.property('nativeName', 'ສປປລາວ')
35
47
  return done()
36
48
  })
37
49
 
38
50
  it('Query Laos in japanese - ラオス人民民主共和国', (done) => {
39
51
  let test = acCountryList.query({ name: 'ラオス人民民主共和国' })
40
- expect(test).toHaveProperty('nativeName', 'ສປປລາວ')
52
+ expect(test).to.have.property('nativeName', 'ສປປລາວ')
41
53
  return done()
42
54
  })
43
55
 
44
56
  it('Query Laos in native - ສປປລາວ', (done) => {
45
57
  let test = acCountryList.query({ name: 'ラオス人民民主共和国' })
46
- expect(test).toHaveProperty('nativeName', 'ສປປລາວ')
58
+ expect(test).to.have.property('nativeName', 'ສປປລາວ')
47
59
  return done()
48
60
  })
49
61
 
50
62
  it('Query name with lower first', (done) => {
51
63
  let test = acCountryList.query({ name: 'deutschland' })
52
- expect(test).toHaveProperty('nativeName', 'Deutschland')
64
+ expect(test).to.have.property('nativeName', 'Deutschland')
53
65
  return done()
54
66
  })
55
67
 
56
68
  it('Query name with not match', (done) => {
57
69
  let test = acCountryList.query({ name: 'wonderland' })
58
- expect(test).toBe.undefined
70
+ expect(test).to.be.undefined
59
71
  return done()
60
72
  })
61
73
  })