Skip to content

Commit 58a05c0

Browse files
committed
refactor: adjust require to @wmfs/cardscript-examples
1 parent 75e78cc commit 58a05c0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"semantic-release": "15.13.1",
2323
"standard": "12.0.1",
2424
"@semantic-release/changelog": "3.0.1",
25-
"@semantic-release/git": "7.0.6"
25+
"@semantic-release/git": "7.0.6",
26+
"@wmfs/cardscript-examples": "1.0.0"
2627
},
2728
"scripts": {
2829
"generate": "node ./lib",

test/unit-tests.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const expect = require('chai').expect
44

55
const CardscriptExpressionsxpressions = require('../lib/')
66
const expressions = new CardscriptExpressionsxpressions()
7-
const expressionForm = require('./../../cardscript-examples/lib/examples/expression')
7+
const { expression } = require('@wmfs/cardscript-examples')
88
const nestedForm = require('./fixtures/nested-set-form')
99
const expressionFilled = require('./fixtures/expression-filled')
1010
const expressionNotFilled = require('./fixtures/expression-not-filled')
@@ -16,7 +16,7 @@ let expressionsFormExpressions, nestedFormExpressions, visibilityList, widgetNam
1616

1717
describe('Loads of tests enit', function () {
1818
it('Should get the list of expressions from the simple Cardscript', done => {
19-
const exp = expressions.getExpressionsFromCardscript(expressionForm)
19+
const exp = expressions.getExpressionsFromCardscript(expression)
2020
expect(exp).to.eql(
2121
[
2222
{
@@ -42,7 +42,7 @@ describe('Loads of tests enit', function () {
4242
})
4343

4444
it('Should use a list of AST\'s to produce a visibility list for expression form (feedback = true)', done => {
45-
const visList = expressions.calculateWidgetVisibility(expressionForm, expressionFilled, expressions.asts)
45+
const visList = expressions.calculateWidgetVisibility(expression, expressionFilled, expressions.asts)
4646
expect(visList).to.eql(
4747
{feedback: true, userWantsToGiveFeedback: true}
4848
)
@@ -62,7 +62,7 @@ describe('Loads of tests enit', function () {
6262
})
6363

6464
it('Should use a list of AST\'s to produce a visibility list for expression form (feedback = false)', done => {
65-
const visList = expressions.calculateWidgetVisibility(expressionForm, expressionNotFilled, expressions.asts)
65+
const visList = expressions.calculateWidgetVisibility(expression, expressionNotFilled, expressions.asts)
6666
expect(visList).to.eql(
6767
{feedback: false, userWantsToGiveFeedback: true}
6868
)

0 commit comments

Comments
 (0)