@digitransit-search-util/digitransit-search-util-is-duplicate 2.1.2 → 2.1.4

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.
Files changed (3) hide show
  1. package/README.md +12 -23
  2. package/package.json +6 -5
  3. package/test.js +4 -6
package/README.md CHANGED
@@ -8,20 +8,20 @@ Checks that is items duplicate
8
8
 
9
9
  ### Parameters
10
10
 
11
- - `item1` **[Object][1]** Object containing following attributes:
11
+ * `item1` **[Object][1]** Object containing following attributes:
12
12
  {
13
- properties {
14
- gtfsId: String
15
- gid: String from geocoder
16
- name: String
17
- label: String
18
- address: String
19
- geometry {
20
- coordinates [Number lat, Number lon]
21
- }
22
- }
13
+ properties {
14
+ gtfsId: String
15
+ gid: String from geocoder
16
+ name: String
17
+ label: String
18
+ address: String
19
+ geometry {
20
+ coordinates \[Number lat, Number lon]
23
21
  }
24
- - `item2` **[Object][1]** Object with same attributes as item1
22
+ }
23
+ }
24
+ * `item2` **[Object][1]** Object with same attributes as item1
25
25
 
26
26
  ### Examples
27
27
 
@@ -35,11 +35,6 @@ Returns **[Boolean][2]** true/false
35
35
  [1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
36
36
 
37
37
  [2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
38
-
39
- <!-- This file is automatically generated. Please don't edit it directly:
40
- if you find an error, edit the source file (likely index.js), and re-run
41
- ./scripts/generate-readmes in the digitransit-util project. -->
42
-
43
38
  ---
44
39
 
45
40
  This module is part of the Digitransit-ui project. It is maintained in the
@@ -53,9 +48,3 @@ Install this module individually:
53
48
  ```sh
54
49
  $ npm install @digitransit-search-util/digitransit-search-util-is-duplicate
55
50
  ```
56
-
57
- Or install the Digitransit-util module that includes it as a function:
58
-
59
- ```sh
60
- $ npm install @digitransit-util/digitransit-util
61
- ```
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@digitransit-search-util/digitransit-search-util-is-duplicate",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "digitransit-search-util is-duplicate module",
5
+ "type": "module",
5
6
  "main": "index.js",
6
7
  "publishConfig": {
7
8
  "access": "public"
8
9
  },
9
10
  "scripts": {
10
- "test": "mocha -r esm test.js",
11
- "docs": "node -r esm ../../scripts/generate-readmes"
11
+ "test": "vitest run --config ../../../config/vitest.config.js \"$PWD/test.js\"",
12
+ "docs": "node ../../../scripts/workspace-packages/generate-readmes.js"
12
13
  },
13
14
  "repository": {
14
15
  "type": "git",
@@ -21,7 +22,7 @@
21
22
  "author": "Digitransit Authors",
22
23
  "license": "(AGPL-3.0 OR EUPL-1.2)",
23
24
  "dependencies": {
24
- "@digitransit-search-util/digitransit-search-util-tru-eq": "^0.0.3"
25
+ "@digitransit-search-util/digitransit-search-util-tru-eq": "^0.0.5"
25
26
  },
26
- "gitHead": "939d1d4a44ac0a04872e90b5ef1d8c92559f597c"
27
+ "gitHead": "14c16d37a997390f8e8575241360922ea3b23d1a"
27
28
  }
package/test.js CHANGED
@@ -1,7 +1,5 @@
1
- /* eslint-disable import/no-extraneous-dependencies */
2
- import { expect } from 'chai';
3
- import { describe, it } from 'mocha';
4
- import isDuplicate from '.';
1
+ import { describe, it, expect } from 'vitest';
2
+ import isDuplicate from './index.js';
5
3
 
6
4
  describe('Testing @digitransit-util/digitransit-util-is-duplicate module', () => {
7
5
  it('Checking that duplicate items returns true', () => {
@@ -31,7 +29,7 @@ describe('Testing @digitransit-util/digitransit-util-is-duplicate module', () =>
31
29
  },
32
30
  };
33
31
  const retValue = isDuplicate(param1, param2);
34
- expect(retValue).to.be.equal(true);
32
+ expect(retValue).toBe(true);
35
33
  });
36
34
 
37
35
  it('Checking that non-duplicate items returns false', () => {
@@ -61,6 +59,6 @@ describe('Testing @digitransit-util/digitransit-util-is-duplicate module', () =>
61
59
  },
62
60
  };
63
61
  const retValue = isDuplicate(param1, param2);
64
- expect(retValue).to.be.equal(true);
62
+ expect(retValue).toBe(true);
65
63
  });
66
64
  });