nfour / fermenter Goto Github PK
View Code? Open in Web Editor NEWA strongly typed Gherkin test runner
A strongly typed Gherkin test runner
When a test is run and a step fails, subsequent steps still execute.
We cannot guarantee state so it just needs to not happen.
Execute the feature file against the FeatureBuilder
test()
executionDo we support it?
Run test suite using [email protected]
, this warning is displayed:
Test suite failed to run
Returning a Promise from "describe" is not supported. Tests must be defined synchronously.
Returning a value from "describe" will fail the test in a future version of Jest.
// file content
at addSpecsToSuite (node_modules/jest-config/node_modules/jest-jasmine2/build/jasmine/Env.js:425:15)
at describeFeature (packages/feature-suite/node_modules/fermenter/Feature.js:50:13)
at Feature (packages/feature-suite/node_modules/fermenter/Feature.js:21:5)
at Object.<anonymous> (packages/feature-suite/specification.feat.js:10:1)
That warning will become a runtime exception in jest@25
. Source: https://github.com/facebook/jest/blob/e08be020e9ddcab5b89cd871a2cbd72f006cda7b/packages/jest-jasmine2/src/jasmine/Env.ts#L427
Remove async
signature in the callback at
Line 97 in 0a1423d
await
anyway.Some functions and interface in the project are under-documented
Add JSDoc comments to:
Currently the step definitions do not error when the ReturnType does not feed into the next step's input state.
Lets make this a constraint.
Currently an erroring step definition results in a useless jest error:
(node:23983) UnhandledPromiseRejectionWarning: Error: Couldn't find a match for Step expression:
I have numbers {int} and {int}
Possible matches:
I have numbers <num1> and <num2>
I substract the numbers
I get <total>
(node:23983) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23983) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
# FAIL src/tests/calculator.framework.test.ts
#
# Your test suite must contain at least one test.
#
# Stack:
#
# at node_modules/jest-cli/build/test_scheduler.js:245:22
Available on NPM:
pickled
eg. pickled cucumber (Parked in npm)cucumiform
https://en.wiktionary.org/wiki/cucumiform#Englishpickling
fermenter
eg. gherkins are fermented cucumbersChoices choices
Currently we just use jest
globals internally for instrumenting tests.
Instead lets provide them as arguments:
GherkinTest({ feature: './foo.feature', BeforeAll: beforeAll, ... })
ScenarioOutlines can't be parsed because:
(node:16183) UnhandledPromiseRejectionWarning: Error: Couldn't find a match for Step expression:
I have numbers {int} and {int}
Possible matches:
I have numbers <num1> and <num2>
I substract the numbers
I get <total>
The angle bracket syntax is unknown to the expression parser we are using for regular scenarios.
CucumberJS
does it
fermenter/src/lib/parseFeature.ts
Lines 24 to 25 in 64f96f2
These lines are supposed to grab current path up until the beginning of line number and column number specifier. However, resolved windows path start with drive name and colon. So this code erroneously removes entire path to the file on windows.
Maybe in regex, instead of grabbing until first colon, it is possible to grab everything in parenthesis and then strip last elements?
Add the expression parser for
Given I have numbers {int} and {int}
We need to have a concept of a composition root to prime state
for a test run.
It does not have to exist in the library or be coupled to any functionality within it.
A GherkinTest
cannot expect a blank state for its step definitions as that would impact the complexity of step definitions.
Solution:
inject('sdk', 'someVar')()
syntax to allow mobx-like compositionWe should be doing TDD now that the base of the project is out of heavy prototype stages.
Create tests for:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.