Updating dependencies, fixing cmi.core.lesson_status for 'not attempted'

This commit is contained in:
Jonathan Putney
2021-04-19 15:38:28 -04:00
parent f2ed09e9ff
commit 6d1eabc3fc
7 changed files with 529 additions and 434 deletions
+55 -15
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -7
View File
File diff suppressed because one or more lines are too long
+16 -16
View File
@@ -1,34 +1,34 @@
{ {
"name": "scorm-again", "name": "scorm-again",
"version": "1.5.1", "version": "1.5.2",
"description": "A modern SCORM JavaScript run-time library for AICC, SCORM 1.2, and SCORM 2004", "description": "A modern SCORM JavaScript run-time library for AICC, SCORM 1.2, and SCORM 2004",
"main": "dist/scorm-again.min.js", "main": "dist/scorm-again.min.js",
"directories": { "directories": {
"test": "test" "test": "test"
}, },
"devDependencies": { "devDependencies": {
"@babel/cli": "^7.13.0", "@babel/cli": "^7.13.14",
"@babel/core": "^7.13.1", "@babel/core": "^7.13.15",
"@babel/node": "^7.13.0", "@babel/node": "^7.13.13",
"@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-optional-chaining": "^7.13.0", "@babel/plugin-proposal-optional-chaining": "^7.13.12",
"@babel/plugin-proposal-private-methods": "^7.13.0", "@babel/plugin-proposal-private-methods": "^7.13.0",
"@babel/preset-env": "^7.13.0", "@babel/preset-env": "^7.13.15",
"@babel/preset-flow": "^7.12.1", "@babel/preset-flow": "^7.13.13",
"@babel/register": "^7.13.0", "@babel/register": "^7.13.14",
"@types/chai": "^4.2.15", "@types/chai": "^4.2.16",
"@types/mocha": "^8.2.0", "@types/mocha": "^8.2.2",
"babel-eslint": "^11.0.0-beta.2", "babel-eslint": "^11.0.0-beta.2",
"babelify": "^10.0.0", "babelify": "^10.0.0",
"browserify": "^17.0.0", "browserify": "^17.0.0",
"chai": "^4.2.0", "chai": "^4.3.4",
"eslint": "^7.20.0", "eslint": "^7.24.0",
"eslint-config-google": "^0.14.0", "eslint-config-google": "^0.14.0",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.22.1",
"fetch-pretender": "^1.5.0", "fetch-pretender": "^1.5.0",
"grunt": "^1.3.0", "grunt": "^1.3.0",
"grunt-browserify": "^5.3.0", "grunt-browserify": "^6.0.0",
"grunt-cli": "^1.3.2", "grunt-cli": "^1.4.2",
"grunt-contrib-watch": "^1.1.0", "grunt-contrib-watch": "^1.1.0",
"grunt-mocha-test": "^0.13.3", "grunt-mocha-test": "^0.13.3",
"jsdoc": "^3.6.6", "jsdoc": "^3.6.6",
@@ -36,11 +36,11 @@
"lodash.debounce": "^4.0.8", "lodash.debounce": "^4.0.8",
"minifyify": "^7.3.5", "minifyify": "^7.3.5",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"mocha": "^8.3.0", "mocha": "^8.3.2",
"mocha-junit-reporter": "^2.0.0", "mocha-junit-reporter": "^2.0.0",
"mochawesome": "^6.2.1", "mochawesome": "^6.2.1",
"nyc": "^15.1.0", "nyc": "^15.1.0",
"sinon": "^9.2.4" "sinon": "^10.0.0"
}, },
"scripts": { "scripts": {
"test": "./node_modules/.bin/mocha --require @babel/register --bdd --recursive --reporter list", "test": "./node_modules/.bin/mocha --require @babel/register --bdd --recursive --reporter list",
+1 -1
View File
@@ -400,7 +400,7 @@ class CMICore extends BaseCMI {
* @param {string} lesson_status * @param {string} lesson_status
*/ */
set lesson_status(lesson_status) { set lesson_status(lesson_status) {
if (check12ValidFormat(lesson_status, scorm12_regex.CMIStatus)) { if (check12ValidFormat(lesson_status, scorm12_regex.CMIStatus2)) {
this.#lesson_status = lesson_status; this.#lesson_status = lesson_status;
} }
} }
+5
View File
@@ -437,6 +437,11 @@ describe('SCORM 1.2 CMI Tests', () => {
fieldName: 'cmi.core.lesson_status', fieldName: 'cmi.core.lesson_status',
expectedValue: 'not attempted', expectedValue: 'not attempted',
}); });
h.checkWrite({
cmi: cmiInitialized(),
fieldName: 'cmi.core.lesson_status',
valueToTest: 'not attempted',
});
h.checkValidValues({ h.checkValidValues({
cmi: cmiInitialized(), cmi: cmiInitialized(),
fieldName: 'cmi.core.lesson_status', fieldName: 'cmi.core.lesson_status',
+444 -394
View File
File diff suppressed because it is too large Load Diff