cassproject 5.0.0 → 5.0.2
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/README.md
CHANGED
|
@@ -40,6 +40,7 @@ Development unit tests presume you have a CaSS Repository running on `localhost:
|
|
|
40
40
|
* Update changelog.
|
|
41
41
|
* `npm install`
|
|
42
42
|
* `npm audit` and fix any audit issues.
|
|
43
|
+
* Update CaSS server version if necessary in package.json
|
|
43
44
|
* `npm test` - Must not fail any tests.
|
|
44
45
|
* `npm run webpack:cypressFirefoxHttps` See if the firefox test case has changed.
|
|
45
46
|
* Document code coverage output by the previous step.
|
|
@@ -49,8 +50,14 @@ Development unit tests presume you have a CaSS Repository running on `localhost:
|
|
|
49
50
|
|
|
50
51
|
# Changelog
|
|
51
52
|
|
|
53
|
+
## 5.0.2
|
|
54
|
+
* Cosmetic and security updates (to dev dependencies)
|
|
55
|
+
|
|
56
|
+
## 5.0.1
|
|
57
|
+
* Updated CEASN import to include versionIdentifier.
|
|
58
|
+
|
|
52
59
|
## 5.0.0
|
|
53
|
-
* Added multidelete to EcRepository
|
|
60
|
+
* Added multidelete to EcRepository.
|
|
54
61
|
* NPM requires semantic versioning coherence, so I must now use big number for version.
|
|
55
62
|
* Added and refined tests to include deleting, multideleting.
|
|
56
63
|
* Made use of EcRepository.cache more consistent.
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cassproject",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "Competency and Skills Service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "concurrently --maxProcesses=
|
|
7
|
+
"test": "concurrently --maxProcesses=1 --kill-others-on-fail \"npm run test16HttpsFips\" \"npm run test16Https11Fips\" \"npm run test16Https\" \"npm run test16Https11\" \"npm run test16Fips\" \"npm run test16\" \"npm run test15HttpsFips\" \"npm run test15Https11Fips\" \"npm run test15Https\" \"npm run test15Https11\" \"npm run test15Fips\" \"npm run test15\"",
|
|
8
8
|
"testActionCypress": "npm run testkill && export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.75 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\"",
|
|
9
9
|
"testCustom": "npm run test14 && npm run test13 && npm run test12",
|
|
10
10
|
"multitest": "concurrently --kill-others-on-fail \"npm run test15\" \"npm run test14\" \"npm run test13\" \"npm run test12\"",
|
|
11
11
|
"testCassTest": "npm run testkill && docker run -d --platform linux/amd64 --network cass-net --name cass-test -p80:80 -e CASS_LOOPBACK cass-test && wait-on http://localhost/api/ping && npm run testNode18 && npm run testNode18Fips && npm run testNode16 && npm run testNode15 && npm run testNode14 && npm run testNode13 && npm run testNode12 && npm run testCypressEdge && npm run testCypress && npm run testkill",
|
|
12
12
|
"testDevHttps": "npm run testkill && docker run -d --platform linux/amd64 --network cass-net --name cass-test -p443:80 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:dev && wait-on https://localhost/api/ping && npm run testNode18HttpsFips && npm run testNode18Https && npm run testNode16Https && npm run testNode15Https && npm run testNode14Https && npm run testNode13Https && npm run testNode12Https && npm run testCypressEdgeHttps && npm run testCypressHttps",
|
|
13
|
-
"test16HttpsFips": "export CASS_LOOPBACK=https://cass-testsf16/api/|| set CASS_LOOPBACK=https://cass-testsf16/api/&& npm run testkillsf16 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf16 -p450:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.
|
|
14
|
-
"test16Https11Fips": "export CASS_LOOPBACK=https://cass-testsf1116/api/|| set CASS_LOOPBACK=https://cass-testsf1116/api/&& npm run testkillsf1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf1116 -p449:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.
|
|
15
|
-
"test16Https": "export CASS_LOOPBACK=https://cass-tests16/api/|| set CASS_LOOPBACK=https://cass-tests16/api/&& npm run testkills16 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests16 -p448:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.
|
|
16
|
-
"test16Https11": "export CASS_LOOPBACK=https://cass-tests1116/api/|| set CASS_LOOPBACK=https://cass-tests1116/api/&& npm run testkills1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1116 -p451:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.
|
|
17
|
-
"test16Fips": "export CASS_LOOPBACK=http://cass-testf16/api/|| set CASS_LOOPBACK=http://cass-testf16/api/&& npm run testkillf16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-testf16 -p83:80 cassproject/cass:1.6.
|
|
18
|
-
"test16": "export CASS_LOOPBACK=http://cass-test16/api/|| set CASS_LOOPBACK=http://cass-test16/api/&& npm run testkill16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test16 -p82:80 cassproject/cass:1.6.
|
|
19
|
-
"test15HttpsFips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-testsf15/api/|| set CASS_LOOPBACK=https://cass-testsf15/api/&& npm run testkillsf15 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf15 -p446:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:446/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf15",
|
|
20
|
-
"test15Https11Fips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-testsf1115/api/|| set CASS_LOOPBACK=https://cass-testsf1115/api/&& npm run testkillsf1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf1115 -p447:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost:447/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf1115",
|
|
21
|
-
"test15Https": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests15/api/|| set CASS_LOOPBACK=https://cass-tests15/api/&& npm run testkills15 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests15 -p444:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:444/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills15",
|
|
22
|
-
"test15Https11": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests1115/api/|| set CASS_LOOPBACK=https://cass-tests1115/api/&& npm run testkills1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1115 -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills1115",
|
|
23
|
-
"test15Fips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-testf15/api/|| set CASS_LOOPBACK=http://cass-testf15/api/&& npm run testkillf15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-testf15 -p81:80 cassproject/cass:1.5.75 && wait-on http://localhost:81/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode22ForceFips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" && npm run testkillf15",
|
|
24
|
-
"test15": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.75 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" && npm run testkill15",
|
|
13
|
+
"test16HttpsFips": "export CASS_LOOPBACK=https://cass-testsf16/api/|| set CASS_LOOPBACK=https://cass-testsf16/api/&& npm run testkillsf16 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf16 -p450:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.4 && wait-on https://localhost:450/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode24HttpsForceFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf16",
|
|
14
|
+
"test16Https11Fips": "export CASS_LOOPBACK=https://cass-testsf1116/api/|| set CASS_LOOPBACK=https://cass-testsf1116/api/&& npm run testkillsf1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf1116 -p449:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.4 && wait-on https://localhost:449/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode24HttpsForceFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf1116",
|
|
15
|
+
"test16Https": "export CASS_LOOPBACK=https://cass-tests16/api/|| set CASS_LOOPBACK=https://cass-tests16/api/&& npm run testkills16 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests16 -p448:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.6.4 && wait-on https://localhost:448/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills16",
|
|
16
|
+
"test16Https11": "export CASS_LOOPBACK=https://cass-tests1116/api/|| set CASS_LOOPBACK=https://cass-tests1116/api/&& npm run testkills1116 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1116 -p451:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.6.4 && wait-on https://localhost:451/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills1116",
|
|
17
|
+
"test16Fips": "export CASS_LOOPBACK=http://cass-testf16/api/|| set CASS_LOOPBACK=http://cass-testf16/api/&& npm run testkillf16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-testf16 -p83:80 cassproject/cass:1.6.4 && wait-on http://localhost:83/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode24ForceFips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode22ForceFips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" && npm run testkillf16",
|
|
18
|
+
"test16": "export CASS_LOOPBACK=http://cass-test16/api/|| set CASS_LOOPBACK=http://cass-test16/api/&& npm run testkill16 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test16 -p82:80 cassproject/cass:1.6.4 && wait-on http://localhost:82/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" && npm run testkill16",
|
|
19
|
+
"test15HttpsFips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-testsf15/api/|| set CASS_LOOPBACK=https://cass-testsf15/api/&& npm run testkillsf15 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf15 -p446:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:446/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf15",
|
|
20
|
+
"test15Https11Fips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-testsf1115/api/|| set CASS_LOOPBACK=https://cass-testsf1115/api/&& npm run testkillsf1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-testsf1115 -p447:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost:447/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode24HttpsForceFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode22HttpsForceFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode20HttpsForceFips\" \"npm run testNode18Https\" && npm run testkillsf1115",
|
|
21
|
+
"test15Https": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests15/api/|| set CASS_LOOPBACK=https://cass-tests15/api/&& npm run testkills15 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests15 -p444:443 -e CASS_LOOPBACK -e HTTPS=true cassproject/cass:1.5.75 && wait-on https://localhost:444/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills15",
|
|
22
|
+
"test15Https11": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=https://cass-tests1115/api/|| set CASS_LOOPBACK=https://cass-tests1115/api/&& npm run testkills1115 && docker run -d --platform linux/amd64 --network cass-net --name cass-tests1115 -p443:443 -e CASS_LOOPBACK -e HTTPS=true -e HTTP2=false cassproject/cass:1.5.75 && wait-on https://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypressHttps\" \"npm run testNode24Https\" \"npm run testNode24HttpsFips\" \"npm run testNode22Https\" \"npm run testNode22HttpsFips\" \"npm run testNode20Https\" \"npm run testNode20HttpsFips\" \"npm run testNode18Https\" && npm run testkills1115",
|
|
23
|
+
"test15Fips": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-testf15/api/|| set CASS_LOOPBACK=http://cass-testf15/api/&& npm run testkillf15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-testf15 -p81:80 cassproject/cass:1.5.75 && wait-on http://localhost:81/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode24ForceFips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode22ForceFips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode20ForceFips\" \"npm run testNode18\" && npm run testkillf15",
|
|
24
|
+
"test15": "export TESTLEVEL=15|| set TESTLEVEL=15&& export CASS_LOOPBACK=http://cass-test15/api/|| set CASS_LOOPBACK=http://cass-test15/api/&& npm run testkill15 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test15 -p80:80 cassproject/cass:1.5.75 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode24\" \"npm run testNode24Fips\" \"npm run testNode22\" \"npm run testNode22Fips\" \"npm run testNode20\" \"npm run testNode20Fips\" \"npm run testNode18\" && npm run testkill15",
|
|
25
25
|
"test14": "npm run testkill14 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test14 -p80:80 cassproject/cass:1.4.4 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill14",
|
|
26
26
|
"test13": "npm run testkill13 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test13 -p80:80 cassproject/cass:1.3.18 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill13",
|
|
27
27
|
"test12": "npm run testkill12 && docker run -d --platform linux/amd64 --network cass-net -e CASS_LOOPBACK --name cass-test12 -p80:80 cassproject/cass:1.2.44 && wait-on http://localhost/api/ping && concurrently --kill-others-on-fail \"npm run testCypress\" \"npm run testNode16\" && npm run testkill12",
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
"testkill13": "docker kill cass-test13 | exit 0 && docker rm cass-test13 | exit 0 && docker network create cass-net | exit 0",
|
|
42
42
|
"testkill12": "docker kill cass-test12 | exit 0 && docker rm cass-test12 | exit 0 && docker network create cass-net | exit 0",
|
|
43
43
|
"testkill": "docker kill cass-test | exit 0 && docker rm cass-test | exit 0 && docker network create cass-net | exit 0",
|
|
44
|
+
"testNode24": "docker build --progress plain -f docker/node24 -t npm-cass24 . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass24",
|
|
45
|
+
"testNode24Https": "docker build --progress plain -f docker/node24https -t npm-cass24https . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass24https",
|
|
46
|
+
"testNode24HttpsFips": "docker build --progress plain -f docker/node24httpsfips -t npm-cass24httpsfips . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass24httpsfips",
|
|
47
|
+
"testNode24HttpsForceFips": "docker build --progress plain -f docker/node24httpsforcefips -t npm-cass24httpsforcefips . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass24httpsforcefips",
|
|
48
|
+
"testNode24ForceFips": "docker build --progress plain -f docker/node24forcefips -t npm-cass24forcefips . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass24forcefips",
|
|
49
|
+
"testNode24Fips": "docker build --progress plain -f docker/node24fips -t npm-cass24fips . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass24fips",
|
|
44
50
|
"testNode22": "docker build --progress plain -f docker/node22 -t npm-cass22 . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass22",
|
|
45
51
|
"testNode22Https": "docker build --progress plain -f docker/node22https -t npm-cass22https . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass22https",
|
|
46
52
|
"testNode22HttpsFips": "docker build --progress plain -f docker/node22httpsfips -t npm-cass22httpsfips . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass22httpsfips",
|
|
@@ -68,8 +74,14 @@
|
|
|
68
74
|
"testNode13Https": "docker build --progress plain -f docker/node13https -t npm-cass13https . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass13https",
|
|
69
75
|
"testNode12": "docker build --progress plain -f docker/node12 -t npm-cass12 . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass12",
|
|
70
76
|
"testNode12Https": "docker build --progress plain -f docker/node12https -t npm-cass12https . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-cass12https",
|
|
71
|
-
"testCypress": "
|
|
72
|
-
"testCypressHttps": "
|
|
77
|
+
"testCypress": "concurrently --kill-others-on-fail \"npm run testCypressEdge\" \"npm run testCypressElectron\" \"npm run testCypressChrome\"",
|
|
78
|
+
"testCypressHttps": "concurrently --kill-others-on-fail \"npm run testCypressEdgeHttps\" \"npm run testCypressElectronHttps\" \"npm run testCypressChromeHttps\"",
|
|
79
|
+
"testCypressEdge": "docker build --progress plain -f docker/cypressEdge -t npm-casscypressedge . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-casscypressedge",
|
|
80
|
+
"testCypressEdgeHttps": "docker build --progress plain -f docker/cypressHttpsEdge -t npm-casscypressedgehttps . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-casscypressedgehttps",
|
|
81
|
+
"testCypressElectron": "docker build --progress plain -f docker/cypressElectron -t npm-casscypresselectron . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-casscypresselectron",
|
|
82
|
+
"testCypressElectronHttps": "docker build --progress plain -f docker/cypressHttpsElectron -t npm-casscypresselectronhttps . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-casscypresselectronhttps",
|
|
83
|
+
"testCypressChrome": "docker build --progress plain -f docker/cypressChrome -t npm-casscypresschrome . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-casscypresschrome",
|
|
84
|
+
"testCypressChromeHttps": "docker build --progress plain -f docker/cypressHttpsChrome -t npm-casscypresschromehttps . && docker run --network cass-net -e CASS_LOOPBACK -e TESTLEVEL --rm npm-casscypresschromehttps",
|
|
73
85
|
"autotest": "nodemon test.js",
|
|
74
86
|
"autoindex": "nodemon index.js",
|
|
75
87
|
"autonyc": "nodemon --exec \"npm run nyc\"",
|
|
@@ -77,7 +89,7 @@
|
|
|
77
89
|
"mocha": "mocha --timeout 30000 -b src/**/*.test.js",
|
|
78
90
|
"mochaFips": "mocha -n 'force-fips' --timeout 30000 -b src/**/*.test.js",
|
|
79
91
|
"mocha:httpsNoHttp2": "export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
|
|
80
|
-
"mocha:https": "mocha --timeout 30000 -b src/**/*.test.js",
|
|
92
|
+
"mocha:https": "export CASS_LOOPBACK=https://localhost/api/|| set CASS_LOOPBACK=https://localhost/api/&& mocha --timeout 30000 -b src/**/*.test.js",
|
|
81
93
|
"mocha:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
|
|
82
94
|
"mochaFips:clientSideCertificates": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha -n 'force-fips' --timeout 30000 -b src/**/*.test.js",
|
|
83
95
|
"mocha:clientSideCertificatesDangerMouse": "export NODE_EXTRA_CA_CERTS=ca.crt|| set NODE_EXTRA_CA_CERTS=ca.crt&&export HTTP2=false|| set HTTP2=false&& mocha --timeout 30000 -b src/**/*.test.js",
|
|
@@ -174,20 +186,20 @@
|
|
|
174
186
|
"@cypress/vite-dev-server": "^5.2.1",
|
|
175
187
|
"@cypress/webpack-preprocessor": "^6.0.4",
|
|
176
188
|
"chai": "4.5.0",
|
|
177
|
-
"concurrently": "^9.1
|
|
189
|
+
"concurrently": "^9.2.1",
|
|
178
190
|
"convert-hrtime": "^5.0.0",
|
|
179
|
-
"cypress": "^
|
|
191
|
+
"cypress": "^15.2.0",
|
|
180
192
|
"cypress-fail-fast": "^7.1.1",
|
|
181
|
-
"eslint": "^9.
|
|
182
|
-
"fake-indexeddb": "^6.
|
|
193
|
+
"eslint": "^9.35.0",
|
|
194
|
+
"fake-indexeddb": "^6.2.2",
|
|
183
195
|
"mocha": "^10.8.2",
|
|
184
196
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
185
197
|
"nodemon": "^3.1.10",
|
|
186
198
|
"nyc": "^17.1.0",
|
|
187
199
|
"sinon": "^19.0.5",
|
|
188
|
-
"url-polyfill": "^1.1.
|
|
189
|
-
"wait-on": "^8.0.
|
|
190
|
-
"webpack": "^5.
|
|
200
|
+
"url-polyfill": "^1.1.14",
|
|
201
|
+
"wait-on": "^8.0.5",
|
|
202
|
+
"webpack": "^5.101.3",
|
|
191
203
|
"webpack-cli": "^5.1.4"
|
|
192
204
|
},
|
|
193
205
|
"packageManager": "npm@11.3.0+sha512.96eb611483f49c55f7fa74df61b588de9e213f80a256728e6798ddc67176c7b07e4a1cfc7de8922422cbce02543714367037536955221fa451b0c4fefaf20c66"
|
|
@@ -169,10 +169,10 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
169
169
|
}
|
|
170
170
|
let negative = await assertion.getNegative();
|
|
171
171
|
if (competencies[assertion.competency] == null)
|
|
172
|
-
competencies[assertion.competency] = {positives:[],negatives:[]};
|
|
173
|
-
if (negative)
|
|
172
|
+
competencies[assertion.competency] = { positives: [], negatives: [] };
|
|
173
|
+
if (negative)
|
|
174
174
|
competencies[assertion.competency].negatives.push(assertion);
|
|
175
|
-
else
|
|
175
|
+
else
|
|
176
176
|
competencies[assertion.competency].positives.push(assertion);
|
|
177
177
|
})
|
|
178
178
|
)
|
|
@@ -227,7 +227,7 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
227
227
|
)
|
|
228
228
|
)
|
|
229
229
|
)
|
|
230
|
-
).then(async() =>
|
|
230
|
+
).then(async () =>
|
|
231
231
|
await Promise.all(
|
|
232
232
|
this.getInEdges(competency).map(async (alignment) =>
|
|
233
233
|
await this.getCompetency(alignment.source).then(async (s) =>
|
|
@@ -311,7 +311,7 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
311
311
|
addToMetaStateArray(metaState, key, value) {
|
|
312
312
|
if (metaState == null) return;
|
|
313
313
|
if (metaState[key] == null) metaState[key] = [];
|
|
314
|
-
metaState[key]
|
|
314
|
+
EcArray.setAdd(metaState[key], value);
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* Fetches the Meta Competency (additional state information used to compute profiles or other data) for a competency.
|
|
@@ -398,7 +398,7 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
398
398
|
}
|
|
399
399
|
getDefaultEdgeType() {
|
|
400
400
|
return EcAlignment.NARROWS;
|
|
401
|
-
}
|
|
401
|
+
}
|
|
402
402
|
inEdgeCache = {};
|
|
403
403
|
outEdgeCache = {};
|
|
404
404
|
getInEdges(vertex) {
|
|
@@ -446,8 +446,7 @@ module.exports = class EcFrameworkGraph extends EcDirectedGraph {
|
|
|
446
446
|
delete this.outEdgeCache[vertex.shortId()];
|
|
447
447
|
return super.removeVertex(vertex);
|
|
448
448
|
}
|
|
449
|
-
cacheEdges(e)
|
|
450
|
-
{
|
|
449
|
+
cacheEdges(e) {
|
|
451
450
|
if (this.inEdgeCache[e.destination.shortId()] == null)
|
|
452
451
|
this.inEdgeCache[e.destination.shortId()] = [];
|
|
453
452
|
this.inEdgeCache[e.destination.shortId()].push(e.edge);
|
|
@@ -31,6 +31,30 @@ const customDocLoader = async (url, options) => {
|
|
|
31
31
|
return result;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
function setVersionIdentifier(f) {
|
|
35
|
+
if (f["ceterms:versionIdentifier"]) {
|
|
36
|
+
if (!Array.isArray(f["ceterms:versionIdentifier"])) {
|
|
37
|
+
f["ceterms:versionIdentifier"] = [f["ceterms:versionIdentifier"]];
|
|
38
|
+
}
|
|
39
|
+
for (let i = f["ceterms:versionIdentifier"].length - 1; i >= 0; i--) {
|
|
40
|
+
try {
|
|
41
|
+
let parts = f["ceterms:versionIdentifier"][i].split("~");
|
|
42
|
+
console.log('parts', parts);
|
|
43
|
+
f["ceterms:versionIdentifier"][i] = {
|
|
44
|
+
"ceterms:identifierValueCode": parts[0],
|
|
45
|
+
"ceterms:identifierTypeName": {
|
|
46
|
+
"@language": "en-us",
|
|
47
|
+
"@value": parts[1]
|
|
48
|
+
},
|
|
49
|
+
"ceterms:identifierType": parts.length > 2 ? parts[2] : undefined
|
|
50
|
+
};
|
|
51
|
+
} catch (e) {
|
|
52
|
+
delete f["ceterms:versionIdentifier"][i];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
34
58
|
module.exports = class CTDLASNCSVConceptImport {
|
|
35
59
|
static analyzeFile(file, success, failure) {
|
|
36
60
|
if (file == null) {
|
|
@@ -137,14 +161,6 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
137
161
|
endpoint,
|
|
138
162
|
repo
|
|
139
163
|
);
|
|
140
|
-
try {
|
|
141
|
-
let existing = await EcRepository.get(translator.id);
|
|
142
|
-
if (existing && existing.type !== translator.type) {
|
|
143
|
-
return failure(`Row ${i + 2}: ${translator.id} already exists as a ${existing.type}`);
|
|
144
|
-
}
|
|
145
|
-
} catch (e) {
|
|
146
|
-
console.error(e);
|
|
147
|
-
}
|
|
148
164
|
if (translator["ceasn:name"] != null) {
|
|
149
165
|
let name = translator["ceasn:name"];
|
|
150
166
|
let nameWithLanguage = {};
|
|
@@ -204,6 +220,7 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
204
220
|
) {
|
|
205
221
|
CTDLASNCSVImport.setDateCreated(e, f);
|
|
206
222
|
}
|
|
223
|
+
setVersionIdentifier(f);
|
|
207
224
|
schemeArray.push(f);
|
|
208
225
|
} else if (pretranslatedE["@type"] == "skos:Concept") {
|
|
209
226
|
let translator = new EcLinkedData(null, null);
|
|
@@ -401,14 +418,6 @@ module.exports = class CTDLASNCSVConceptImport {
|
|
|
401
418
|
endpoint,
|
|
402
419
|
repo
|
|
403
420
|
);
|
|
404
|
-
try {
|
|
405
|
-
let existing = await EcRepository.get(translator.id);
|
|
406
|
-
if (existing && existing.type !== translator.type) {
|
|
407
|
-
return failure(`Row ${i + 2}: ${translator.id} already exists as a ${existing.type}`);
|
|
408
|
-
}
|
|
409
|
-
} catch (e) {
|
|
410
|
-
console.error(e);
|
|
411
|
-
}
|
|
412
421
|
if (translator["ceasn:name"] != null) {
|
|
413
422
|
let name = translator["ceasn:name"];
|
|
414
423
|
let nameWithLanguage = {};
|
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
const EcArray = require("../../../com/eduworks/ec/array/EcArray");
|
|
2
2
|
const EcRemote = require("../../../com/eduworks/ec/remote/EcRemote");
|
|
3
3
|
|
|
4
|
+
function setVersionIdentifier(f) {
|
|
5
|
+
if (f["ceterms:versionIdentifier"]) {
|
|
6
|
+
if (!Array.isArray(f["ceterms:versionIdentifier"])) {
|
|
7
|
+
f["ceterms:versionIdentifier"] = [f["ceterms:versionIdentifier"]];
|
|
8
|
+
}
|
|
9
|
+
for (let i = f["ceterms:versionIdentifier"].length - 1; i >= 0; i--) {
|
|
10
|
+
try {
|
|
11
|
+
let parts = f["ceterms:versionIdentifier"][i].split("~");
|
|
12
|
+
console.log('parts', parts);
|
|
13
|
+
f["ceterms:versionIdentifier"][i] = {
|
|
14
|
+
"ceterms:identifierValueCode": parts[0],
|
|
15
|
+
"ceterms:identifierTypeName": {
|
|
16
|
+
"@language": "en-us",
|
|
17
|
+
"@value": parts[1]
|
|
18
|
+
},
|
|
19
|
+
"ceterms:identifierType": parts.length > 2 ? parts[2] : undefined
|
|
20
|
+
};
|
|
21
|
+
} catch (e) {
|
|
22
|
+
delete f["ceterms:versionIdentifier"][i];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
4
28
|
module.exports = class CTDLASNCSVImport {
|
|
5
29
|
static analyzeFile(file, success, failure) {
|
|
6
30
|
if (file == null) {
|
|
@@ -191,7 +215,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
191
215
|
);
|
|
192
216
|
try {
|
|
193
217
|
let existing = await EcRepository.get(translator.id);
|
|
194
|
-
if (existing && existing.type !==
|
|
218
|
+
if (existing && existing.type !== 'Framework') {
|
|
195
219
|
return failure(`Row ${i + 2}: ${translator.id} already exists as a ${existing.type}`);
|
|
196
220
|
}
|
|
197
221
|
} catch (e) {
|
|
@@ -301,6 +325,9 @@ module.exports = class CTDLASNCSVImport {
|
|
|
301
325
|
}
|
|
302
326
|
});
|
|
303
327
|
}
|
|
328
|
+
|
|
329
|
+
setVersionIdentifier(f);
|
|
330
|
+
|
|
304
331
|
frameworkArray.push(f);
|
|
305
332
|
f.competency = [];
|
|
306
333
|
f.relation = [];
|
|
@@ -598,6 +625,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
598
625
|
f["ceasn:minorAlignment"] = null;
|
|
599
626
|
f["ceasn:prerequisiteAlignment"] = null;
|
|
600
627
|
f["ceasn:hasChild"] = null;
|
|
628
|
+
setVersionIdentifier(f);
|
|
601
629
|
competencies.push(f);
|
|
602
630
|
competencyRows[f.shortId()] = e;
|
|
603
631
|
} else if (
|
|
@@ -684,14 +712,6 @@ module.exports = class CTDLASNCSVImport {
|
|
|
684
712
|
endpoint,
|
|
685
713
|
repo
|
|
686
714
|
);
|
|
687
|
-
try {
|
|
688
|
-
let existing = await EcRepository.get(translator.id);
|
|
689
|
-
if (existing && existing.type !== translator.type) {
|
|
690
|
-
return failure(`Row ${i + 2}: ${translator.id} already exists as a ${existing.type}`);
|
|
691
|
-
}
|
|
692
|
-
} catch (e) {
|
|
693
|
-
console.error(e);
|
|
694
|
-
}
|
|
695
715
|
for (let each in translator) {
|
|
696
716
|
if (terms[each]) {
|
|
697
717
|
translator[terms[each]] = translator[each];
|
|
@@ -749,6 +769,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
749
769
|
}
|
|
750
770
|
});
|
|
751
771
|
}
|
|
772
|
+
setVersionIdentifier(f);
|
|
752
773
|
delete f["ceterms:hasMember"];
|
|
753
774
|
f.relation = [];
|
|
754
775
|
f.subType = "Collection";
|
|
@@ -964,6 +985,7 @@ module.exports = class CTDLASNCSVImport {
|
|
|
964
985
|
f["ceasn:prerequisiteAlignment"] = null;
|
|
965
986
|
f["ceasn:hasChild"] = null;
|
|
966
987
|
f["ceterms:isMemberOf"] = null;
|
|
988
|
+
setVersionIdentifier(f);
|
|
967
989
|
competencies.push(f);
|
|
968
990
|
competencyRows[f.shortId()] = e;
|
|
969
991
|
} else if (
|
|
@@ -14,135 +14,4 @@ describe('EcCompetency', async function () {
|
|
|
14
14
|
|
|
15
15
|
const repo = new EcRepository();
|
|
16
16
|
await repo.init(process.env.CASS_LOOPBACK || "http://localhost/api/");
|
|
17
|
-
|
|
18
|
-
beforeEach(function () {
|
|
19
|
-
competency = new EcCompetency();
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('should initialize with template values', function () {
|
|
23
|
-
EcCompetency.template = { '@name': 'Test Competency' };
|
|
24
|
-
competency = new EcCompetency();
|
|
25
|
-
expect(competency.name).to.equal('Test Competency');
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
it('should check equality based on id', function () {
|
|
29
|
-
competency.id = 'testId';
|
|
30
|
-
const obj = { id: 'testId' };
|
|
31
|
-
expect(competency.equals(obj)).to.be.true;
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('should retrieve competency asynchronously', function (done) {
|
|
35
|
-
const stub = sinon.stub(EcRepository, 'getAs').callsFake((id, obj, success) => {
|
|
36
|
-
success(obj);
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
EcCompetency.get('testId', function (result) {
|
|
40
|
-
expect(result).to.be.instanceOf(EcCompetency);
|
|
41
|
-
stub.restore();
|
|
42
|
-
done();
|
|
43
|
-
}, done);
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
it('should retrieve competency synchronously', function () {
|
|
47
|
-
const stub = sinon.stub(EcRepository, 'getAs').returns(new EcCompetency());
|
|
48
|
-
|
|
49
|
-
const result = EcCompetency.getBlocking('testId');
|
|
50
|
-
expect(result).to.be.instanceOf(EcCompetency);
|
|
51
|
-
stub.restore();
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('should search for competencies', function (done) {
|
|
55
|
-
const stub = sinon.stub(EcRepository, 'searchAs').callsFake((repo, query, factory, success) => {
|
|
56
|
-
success([new EcCompetency()]);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
EcCompetency.search(null, 'query', function (results) {
|
|
60
|
-
expect(results).to.be.an('array').that.is.not.empty;
|
|
61
|
-
stub.restore();
|
|
62
|
-
done();
|
|
63
|
-
}, done);
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('should add an alignment', async function () {
|
|
67
|
-
const stub = sinon.stub(EcAlignment.prototype, 'save').resolves();
|
|
68
|
-
const target = new EcCompetency();
|
|
69
|
-
const owner = EcPpk.generateKey();
|
|
70
|
-
|
|
71
|
-
const alignment = await competency.addAlignment(target, 'alignmentType', owner);
|
|
72
|
-
expect(alignment).to.be.instanceOf(EcAlignment);
|
|
73
|
-
stub.restore();
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('should search for relationships', function (done) {
|
|
77
|
-
const stub = sinon.stub(EcAlignment, 'search').callsFake((repo, query, success) => {
|
|
78
|
-
success([new EcAlignment()]);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
competency.relations(null, function (result) {
|
|
82
|
-
expect(result).to.be.instanceOf(EcAlignment);
|
|
83
|
-
stub.restore();
|
|
84
|
-
done();
|
|
85
|
-
}, done);
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
it('should add a level', async function () {
|
|
89
|
-
const stub = sinon.stub(EcLevel.prototype, 'save').resolves();
|
|
90
|
-
const owner = EcPpk.generateKey();
|
|
91
|
-
|
|
92
|
-
const level = await competency.addLevel('name', 'description', owner,null,null,repo);
|
|
93
|
-
expect(level).to.be.instanceOf(EcLevel);
|
|
94
|
-
stub.restore();
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it('should search for levels', function (done) {
|
|
98
|
-
const stub = sinon.stub(EcLevel, 'search').callsFake((repo, query, success) => {
|
|
99
|
-
success([new EcLevel()]);
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
competency.levels(null, function (result) {
|
|
103
|
-
expect(result).to.be.instanceOf(EcLevel);
|
|
104
|
-
stub.restore();
|
|
105
|
-
done();
|
|
106
|
-
}, done);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
it('should add a rollup rule', async function () {
|
|
110
|
-
const stub = sinon.stub(EcRollupRule.prototype, 'save').resolves();
|
|
111
|
-
const owner = EcPpk.generateKey();
|
|
112
|
-
|
|
113
|
-
const rollupRule = await competency.addRollupRule('name', 'description', owner,null,null,repo);
|
|
114
|
-
expect(rollupRule).to.be.instanceOf(EcRollupRule);
|
|
115
|
-
stub.restore();
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
it('should search for rollup rules', function (done) {
|
|
119
|
-
const stub = sinon.stub(EcRollupRule, 'search').callsFake((repo, query, success) => {
|
|
120
|
-
success([new EcRollupRule()]);
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
competency.rollupRules(null, function (result) {
|
|
124
|
-
expect(result).to.be.instanceOf(EcRollupRule);
|
|
125
|
-
stub.restore();
|
|
126
|
-
done();
|
|
127
|
-
}, done);
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
it('should set scope', function () {
|
|
131
|
-
competency.setScope('testScope');
|
|
132
|
-
expect(competency.scope).to.equal('testScope');
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
it('should save competency', function (done) {
|
|
136
|
-
const stub = sinon.stub(EcRepository, 'save').callsFake((obj, success) => {
|
|
137
|
-
success();
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
competency.name = 'testName';
|
|
141
|
-
competency.save(function () {
|
|
142
|
-
stub.restore();
|
|
143
|
-
expect(competency.name).to.equal('testName');
|
|
144
|
-
done();
|
|
145
|
-
}, done);
|
|
146
|
-
});
|
|
147
|
-
|
|
148
17
|
});
|