GetValue should no longer throw an exception if an error code is returned
This was causing issues with JavaScript execution stopping on the exception, preventing further processing in the module. This was especially an issue when the module was trying to get a value that it should have been providing in the first place (looking at you SkillSoft)
This commit is contained in:
14
.run/Mocha Unit Tests.run.xml
Normal file
14
.run/Mocha Unit Tests.run.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Mocha Unit Tests" type="mocha-javascript-test-runner">
|
||||
<node-interpreter>project</node-interpreter>
|
||||
<node-options />
|
||||
<mocha-package>$PROJECT_DIR$/node_modules/mocha</mocha-package>
|
||||
<working-directory>$PROJECT_DIR$</working-directory>
|
||||
<pass-parent-env>true</pass-parent-env>
|
||||
<ui>bdd</ui>
|
||||
<extra-mocha-options>--watch --require @babel/register</extra-mocha-options>
|
||||
<test-kind>PATTERN</test-kind>
|
||||
<test-pattern>test/**/*.spec.js</test-pattern>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
12
.run/compile.run.xml
Normal file
12
.run/compile.run.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="compile" type="js.build_tools.npm" nameIsGenerated="true">
|
||||
<package-json value="$PROJECT_DIR$/package.json" />
|
||||
<command value="run" />
|
||||
<scripts>
|
||||
<script value="compile" />
|
||||
</scripts>
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
</component>
|
||||
@@ -71,7 +71,7 @@ export const checkLMSGetValue = (
|
||||
initializeFirst = false,
|
||||
initializationValue = '',
|
||||
expectedError = 0,
|
||||
errorThrown = true,
|
||||
errorThrown = false,
|
||||
}) => {
|
||||
describe(`Field: ${fieldName}`, () => {
|
||||
const status = expectedError > 0 ? 'fail to' : 'successfully';
|
||||
|
||||
Reference in New Issue
Block a user