You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2019. It is now read-only.
# Use the Software Manager to install the "Npm" package.# optionally: sudo apt-get install npm cd /usr/bin/
sudo ln -s /usr/bin/nodejs node
cd /some/dev/path
git clone https://github.com/cucumber/microcuke.git
cd microcuke
npm install
npm test
Below are the results of npm test:
> microcuke@1.0.0 test /home/drhuffman/_dev_/github.com/cucumber/microcuke
> ISTANBUL=true istanbul cover _mocha -- --recursive
TagExpressionParser
#parse
✓ a and b
✓ a or b
✓ not a
✓ ( a and b ) or ( c and d )
✓ not a or b and not c or not d or e and f
✓ evaluates not
✓ evaluates and
✓ evaluates or
✓ errors on extra close paren
✓ errors on extra close paren
✓ errors on unclosed paren
✓ errors when there are several expressions
GlueLoader
#loadGlue
✓ loads step definitions
✓ loads hooks
Glue
#createTestCase
✓ tells step definitions to create test steps from pickle steps
1) creates an undefined step when no stepdefs match
✓ throws an exception when two stepdefs match
✓ creates test cases with hooks
Hook
#createTestStep
- returns null when the hook's tag expression doesn't match the pickle's tags ✓ returns a TestStep when there is no tag expression PickleLoader #loadPickles ✓ loads pickles from directory ✓ loads pickles from file ✓ filters pickles by line number ✓ filters pickles by tag expressions PrettyPlugin ✓ prints passing step as green ✓ prints failing step as red Runtime #execute ✓ runs test cases in sequence StepDefinition #createTestStep ✓ returns null when the regexp doesn't match the pickleStep's text ✓ returns a TestStep when the regexp matches the pickleStep's text
✓ creates a TestStep that passes captures to body function
✓ throws an error when the number of capture groups is different from the number of functionparameters
TestCase
#execute
✓ tells next step to run when the previous one passed
✓ uses the same this object across steps
✓ tells next step to not run when previous one failed
TestStep
#execute
✓ fires an event with status=unknown before a step is executed
✓ fires an event with status=failed when returning a rejected promise
✓ fires an event with status=failed when an exception is thrown
✓ fires an event with status=skipped when the run parameter is false
✓ fires an event with status=passed when no exception is thrown
✓ fires an event with status=passed when returning a resolved promise
✓ fires an event with status=undefined when no body exists
✓ passes argument values to body function
40 passing (78ms)
1 pending
1 failing
1) Glue #createTestCase creates an undefined step when no stepdefs match:
AssertionError: { line: 3, column: 11 } deepEqual { path: 'features/hello.feature', line: 3, column: 11 }
+ expected - actual
{
"column": 11
"line": 3
+ "path": "features/hello.feature"
}
at EventEmitter.<anonymous> (test/cucumber/glue_test.js:54:16)
at lib/cucumber/test_step.js:9:2443
=============================================================================
Writing coverage object [/home/drhuffman/_dev_/github.com/cucumber/microcuke/coverage/coverage.json]
Writing coverage reports at [/home/drhuffman/_dev_/github.com/cucumber/microcuke/coverage]
=============================================================================
=============================== Coverage summary ===============================
Statements : 100% ( 314/314 ), 3 ignored
Branches : 94.37% ( 67/71 )
Functions : 100% ( 93/93 ), 3 ignored
Lines : 100% ( 312/312 )
================================================================================
npm ERR! Test failed. See above for more details.
This is on Linux mint; below is some version info:
$ uname -srvmpio
Linux 4.8.0-41-generic #44~16.04.1-Ubuntu SMP Fri Mar 3 17:11:16 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ cat /proc/version
Linux version 4.8.0-41-generic (buildd@lcy01-01) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #44~16.04.1-Ubuntu SMP Fri Mar 3 17:11:16 UTC 2017
$ cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18.1
DISTRIB_CODENAME=serena
DISTRIB_DESCRIPTION="Linux Mint 18.1 Serena"
NAME="Linux Mint"
VERSION="18.1 (Serena)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.1"
VERSION_ID="18.1"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=serena
UBUNTU_CODENAME=xenial
cat: /etc/upstream-release: Is a directory
$ npm -v
3.5.2
$ node -v
v4.2.6
As of commit 0d831da35d285b8400bcad0e03a71ff633062a0b ,
npm testerrors with:Glue #createTestCase creates an undefined step when no stepdefs match.Below are my steps:
Below are the results of
npm test:This is on Linux mint; below is some version info: