Closed lukepighetti closed 6 years ago
I switched my example to match the Jest docs exactly and I get the same error. https://github.com/goldibex/targaryen/tree/master/docs/jest
So I just decided to try using Targaryan's built in integration tests with Targaryan installed globally and I get this error
$ targaryen database.rules.json database.test.json
/usr/local/lib/node_modules/targaryen/lib/parser/statement/identifier.js:26
throw new ParseError(this, `${this.name} is undefined`); ^
Error: value: value is undefined
at IdentifierNode.inferType (/usr/local/lib/node_modules/targaryen/lib/parser/statement/identifier.js:26:13) at new Node (/usr/local/lib/node_modules/targaryen/lib/parser/statement/base.js:50:30)
at new IdentifierNode (/usr/local/lib/node_modules/targaryen/lib/parser/statement/identifier.js:18:1) at Function.from (/usr/local/lib/node_modules/targaryen/lib/parser/statement/base.js:175:12)
at BinaryNode.init (/usr/local/lib/node_modules/targaryen/lib/parser/statement/binary.js:31:22) at new Node (/usr/local/lib/node_modules/targaryen/lib/parser/statement/base.js:49:10)
at new BinaryNode (/usr/local/lib/node_modules/targaryen/lib/parser/statement/binary.js:24:1) at Function.from (/usr/local/lib/node_modules/targaryen/lib/parser/statement/base.js:175:12)
at ConditionalNode.init (/usr/local/lib/node_modules/targaryen/lib/parser/statement/conditional.js:21:22) at new Node (/usr/local/lib/node_modules/targaryen/lib/parser/statement/base.js:49:10)
Is this package broken? Just want to know if I should continue spending time on it or not. Cheers.
You can imagine my embarrassment when I realized I used "value" instead of "this" in my Bolt rules.
Honestly it's probably not, but I'm at a loss here.
./projects.test.js
../database.rules.json
./projects.mock.json
../package.json
declaration exception
it seems like it's telling me that getDatabase() is undefined? I'm at a loss here, I seem to be the only person online having this problem so I'm sure I made a mistake, but I cannot figure out where.