mthuret / storybook-addon-specifications

:book: Write tests next to your stories and display their results inside storybook interface
458 stars 54 forks source link

Run specs with Jest outside of storybook or all tests in storybook #17

Open joevbruno opened 7 years ago

joevbruno commented 7 years ago

I'm using Jest as my test runner, and I've noticed that at times I want to run the same tests from both with storybook (with the spec addon) and outside of it (with just the Jest command in the terminal), but I'm running into issues making this work. I can create independent functions and then import those functions into separate files - a comp.test.js and a comp.stories.js and execute those files with Jest and Storybook respectively, and that works, but I would love a little cleaner solution, like "execute all storybook tests in terminal". Any ideas?

mthuret commented 7 years ago

I'm not sure ton understand what you mean by you need to use different files . Also can you explicit more what you mean by this: "execute all storybook tests in terminal". Currently this plugin allow you to display tests results as specs in storybook (tests are played each time you see a storybook page, but only those concerned by the story). You can also use the .stories.js file directly within you test runner to avoid rewriting your test and to have a proper ci.

Did you try to follow the tutorial in the readme with the creation of the facade? Do you have some concrete issue that you encounter?

ShMcK commented 7 years ago

I believe the problem is a similar one I'm having.

File structure:

|- App.stories.js
|- App.test.js

/ App.stories.js

storiesOf('App', module)
  .add('with greeting', () => {
    const greeting = 'Hello'
    const story = <App greeting={greeting} />
    specs(() => require('./App.test').tests) // run tests from separate file
    return story
  })

/ App.test.js

import React from 'react'
import ReactDOM from 'react-dom'
import App from './index'
import { mount } from 'enzyme'

// tests are loaded in React Storybook
export const tests = describe('App', () => {
  it('Should have the Hello World label', () => {
    const output = mount(<App greeting="Hello" />)
    expect(output.text()).toContain('World!')
  })
})

I can get my tests to run with Jest, or I can get my tests to run with React Storybook, but can't seem to have my cake and eat it too.

StoryBook Fails

The Storybook error has to do with describe & ,it not being loaded from 'storybook-addon-specifications'.

Jest Fails

If I set describe and it as defaults, Jest fails.

/ App.test.js

describe = describe || require('storybook-addon-specifications').describe
it = it || require('storybook-addon-specifications').it

Facade.js

Perhaps my "facade.js" file is not working. If that is the case, how can I verify it's failure?

ShMcK commented 7 years ago

Finally worked out a solution. See the code in this boilerplate repo I put together.

Tests now load in Jest & React Storybook, while maintaining the tests in a different file.

Solution

Configure the Storybook test settings on startup using globals.

/.storybook/test.js

import { describe, it } from 'storybook-addon-specifications'
import expect from 'expect'

window.describe = describe
window.it = it
window.expect = expect

/.storybook/config.js

/* imports */
import './test'

/* config */

Import the tests so that they are loaded on startup. Do not use "require".

/components/App.stories.js

import { tests } from './App.test'

storiesOf('App', module)
  .add('with greeting', () => {
    const greeting = 'Hello'
    const story = <App greeting={greeting} />
    specs(() => tests)
    return story
  })
mthuret commented 7 years ago

Oh ok, you wanted to go in the opposite direction of what I have in mind while creating this addon. That's nice if you manage to make it work.

Question: the tests you pass to the story actually aren't using the story itself but use another component declaration. That means that you'll need to maintain this declaration synchronized in time. Maybe those two could be merged?

ndelangen commented 7 years ago

@ShMcK I Have come up with a pretty much identical solution.

/.storybook/config.js

import './test-register'

/.storybook/test-register.js

const {
  after: afterAll,
  before: beforeAll,
  afterEach,
  beforeEach,
  it,
  specs,
  describe
} = require('storybook-addon-specifications');
const expect = require('expect');

const additions = { expect, afterAll, afterEach, beforeAll, beforeEach, it, specs, describe };

Object.assign(global, additions);
module.exports = additions;

I feel like the import in config.js actually would make more sense in /.storybook/addons.js? But unfortunately that didn't work.

ndelangen commented 7 years ago

I'm looking into being able to nest describes in tests:

describe('Component Name', () => {
  describe('section 1', () => {
    it('should be awesome', () => {
      const output = mount(<Component/>);
      expect(output.text()).toContain('Awesome');
    });
  });
});

Currently this will display nothing in the specifications tab.

mthuret commented 7 years ago

@ndelangen can you open another issue describe this behavior please?

mthuret commented 7 years ago

@ndelangen, @ShMcK : maybe you could add en entry on the readme explaining how to include external tests inside storybook?

ndelangen commented 7 years ago

I'll describe the setup that worked for me in a markdown doc, and submit a PR.

Do you want me to add it to Readme.md ? because it's already quite big as it is? @mthuret

ShMcK commented 7 years ago

Added a README pull request explaining how to setup external tests. #19

gunnx commented 7 years ago

@ndelangen @ShMcK In the docs for having tests in external file, what are the pros/cons for doing this? I've tried to setup that way and I like it in that, the spec files are completely standalone and run via Jest without any facade or mocking. The only con I see is a duplication of including the component in both files, aware of anything else? Perhaps others like everything to be in one file but the nesting can start to look too busy when you have lots of tests.

In the following code example, there was no mention of installing expect does it have to be this version? Is this exactly the same one that is used by Jest. I actually use Chai expect as I use chai-enzyme for my spec files so wanted to use that.

import { describe, it } from 'storybook-addon-specifications'
import expect from 'expect'

window.describe = describe
window.it = it
window.expect = expect

Thank you.

ndelangen commented 7 years ago

It's been a little while since I've used react storybook in production, but last time I was working on this, I had come to this conclusion:

What I want is my full jest test-suite to run, then start watching. The results (json) should be recorded, and pushed to storybook. And when in watch / dev -mode, when jest has detected a change, and run on the changed files, the new bit of json should be pushed to storybook. Probably over a websocket.

With the recent addition of server-middleware to storybook this is possible. I've written a POC jest observer: https://github.com/ndelangen/jest-observer that captures jest's output-json, only to discover this is totally unnecessary if I'd utilize node-ipc. But perhaps the observer could be a nice abstraction for this, I don't know.

Anyway, the json would need to be rendered into some UI in storybook, and possibly be split and matched up with the right story..


All of this because: jest does not run in a browser. I've tried getting it to run in a browser environment, but I've had no luck so far.

By moving the test into their own file, they seem to be normal jest test files, unrelated to storybook. But they can't be full jest test-files, because it's not actually jest running in the browser, so only a subset of the jest api is available.

Once I've got time / use storybook in production again, I'll probably finish this tooling.


Sorry for the side-track, What you're asking is the cons of placing the tests in a separate file: Don't be fooled it's jest running in the browser and understand it's a subset of jest's features at your disposal.

Regarding chai, seems like that should work just fine.

mthuret commented 7 years ago

I need to have a look at this server-middleware new feature of storybook. As you said @ndelangen you can not use every jest features with the specs addons as it will not run in the browser.

So basically as long as you test pure UI component with enzyme you're fine, but as soon as you have connected one or IO to mock, you're stucked. You can still use the old way to test your stories by importing them directly in a jest file, but you will not have any specs displayed on the storybook, which is a loss.

mthuret commented 7 years ago

One thing that could be nice for a v2 of the specs addons is:

There's one thing I don't know how to handle yet. Basically what I'm trying to have is:

FeatureA.stories.js

storiesOf('RefinementList'); stories.add('story1'); stories.add('story2');

FeatureA.test.js

describe('RefinementList') describe('story1') it('specs1') it('specs2') describe('story2') ...

But the problem with that is that the jest json output doesn't handle the describe hierarchy, everything is flatten under one filename.

gunnx commented 7 years ago

Thanks I wasn't aware of that, the streaming test results to storybook sounds great and means they run in Node. Only recently moved over to Jest and I do like some of it features, but it seems Mocha still have plenty of advantages. So I think expect and jest expect and chai expect are all different, so need to ensure when redefining expect in .storybook/config.js that its the same as what runs in the spec files. So perhaps its safer to use chai everywhere

ndelangen commented 7 years ago

@mthuret I haven't taken a deep look into the jest output json, but that would indeed make it hard to make it do what you want.

How bad would it be to show all unit test off all stories? aka show all test in the file?

mthuret commented 7 years ago

Well I assume you could have variation depending on the props, so you would end up with some tests that are not directly related to the current story. But maybe this first step is a good start :)

ndelangen commented 7 years ago

Yeah that's what I was thinking, and maybe jest actually has a way of getting more verbose json? Or we could request/suggest such a feature. Seems necessary if someone would want to write a true GUI for jest.

mthuret commented 7 years ago

I was thinking of creating a new testResultsProcessor, it seems that we can get all the needed informations there.

ndelangen commented 7 years ago

https://facebook.github.io/jest/docs/configuration.html#testresultsprocessor-string

Here's a little experiment I did with that: https://github.com/ndelangen/jest-recorder

mthuret commented 7 years ago

So I worked on this feature this week-end and you can see a preview of it on this branch: https://github.com/mthuret/storybook-addon-specifications/tree/jest-test-files

If you want to see it live, just run the storybook and go to the HelloWorld stories. It will run tests through jest on the server.

I'm not sure I should use the jest-cli like I do, but it works. It slower than if you ran test in the browser, especially if you have several file matching your stories name. I need to dig a little bit to see if it's possible to run jest on a precise file. Also another con is that if you are publishing your storybook statically the new middleware will not work and thus specifications will not be displayed.

@ndelangen what do you think about it?

ndelangen commented 7 years ago

Took a super-quick look, and think this could work. But can I suggest something?

Right now it looks like switching stories makes an api call, then have jest run tests, send the results and then render them in storybook. Is this correct?

What we can do is run jest on all files on start, and send the entire result to storybook.

Of course we want to show the right test-results, even if source- or test-files change. To accomplish this we can run the test again manually using a pattern. But a far more efficient approach would be using jest's watch-mode, and streaming the new results to storybook.

It would mean adding websocket support in the middleware, and connecting to the websocket in the plugin. Next we could try and connecting to an existing jest instance in watchmode, or spin up our own.

What do you think?


Concerning static publishing, in order to make this possible we need to generate jest output in advance. This means hooking into the storybook build-script. I'm not sure that has been done before? But could be another feature to add to storybook if not already possible.


I'm happy to help you build this btw, need to find time. 🤞🏻

mthuret commented 7 years ago

Thanks for the feedback @ndelangen. I really like your proposal even if it's require more work :)

Also I will be more than happy if you help me build this, as I think it could really solve a lot of issues that exists today.

ndelangen commented 7 years ago

Yeah that's what I was thinking, and maybe jest actually has a way of getting more verbose json

I did a dive into the json jest output's and it actually has all the data we need. The trick is: it's layered by describes:

jest.runCLI({watchAll: false, verbose: true}, getPackageRoot(), (result) => {
  fs.writeFile('./result.json', JSON.stringify(result, null, 2) , 'utf-8');
});

will output:

{
  "numFailedTestSuites": 2,
  "numFailedTests": 3,
  "numPassedTestSuites": 1,
  "numPassedTests": 6,
  "numPendingTestSuites": 0,
  "numPendingTests": 0,
  "numRuntimeErrorTestSuites": 0,
  "numTotalTestSuites": 3,
  "numTotalTests": 9,
  "snapshot": {
    "added": 0,
    "failure": false,
    "filesAdded": 0,
    "filesRemoved": 0,
    "filesUnmatched": 0,
    "filesUpdated": 0,
    "matched": 2,
    "total": 2,
    "unchecked": 0,
    "unmatched": 0,
    "updated": 0
  },
  "startTime": 1488870837491,
  "success": false,
  "testResults": [
    {
      "console": null,
      "failureMessage": null,
      "numFailingTests": 0,
      "numPassingTests": 5,
      "numPendingTests": 0,
      "perfStats": {
        "end": 1488870839114,
        "start": 1488870838543
      },
      "snapshot": {
        "added": 0,
        "fileDeleted": false,
        "matched": 2,
        "unchecked": 0,
        "unmatched": 0,
        "updated": 0
      },
      "testFilePath": "/Users/dev/Projects/Playground/storybook-addon-specifications/.storybook/__tests__/sample.ci.jest.stories.js",
      "testResults": [
        {
          "ancestorTitles": [
            "Hello World"
          ],
          "duration": 18,
          "failureMessages": [],
          "fullName": "Hello World Should have the Hello World label",
          "numPassingAsserts": 0,
          "status": "passed",
          "title": "Should have the Hello World label"
        },
        {
          "ancestorTitles": [
            "Hello World"
          ],
          "duration": 3,
          "failureMessages": [],
          "fullName": "Hello World Should have the Hello World label",
          "numPassingAsserts": 0,
          "status": "passed",
          "title": "Should have the Hello World label"
        },
        {
          "ancestorTitles": [],
          "duration": 33,
          "failureMessages": [],
          "fullName": "test Hello World",
          "numPassingAsserts": 0,
          "status": "passed",
          "title": "Hello World"
        },
        {
          "ancestorTitles": [
            "Hello Earth"
          ],
          "duration": 1,
          "failureMessages": [],
          "fullName": "Hello Earth Should have the Hello Earth label",
          "numPassingAsserts": 0,
          "status": "passed",
          "title": "Should have the Hello Earth label"
        },
        {
          "ancestorTitles": [],
          "duration": 0,
          "failureMessages": [],
          "fullName": "test Hello Earth",
          "numPassingAsserts": 0,
          "status": "passed",
          "title": "Hello Earth"
        }
      ],
      "skipped": false
    },
    {
      "console": null,
      "failureMessage": "\u001b[1m\u001b[31m  \u001b[1m● \u001b[1mHelloWorld › story1 › Should have the Hello World label\u001b[39m\u001b[22m\n\n    Expected 1 to be 2\n\u001b[2m      \n      \u001b[2mat assert (\u001b[2mnode_modules/expect/lib/assert.js\u001b[2m:29:9)\u001b[2m\n      \u001b[2mat Expectation.toBe (\u001b[2mnode_modules/expect/lib/Expectation.js\u001b[2m:66:28)\u001b[2m\n      \u001b[2mat Object.<anonymous> (\u001b[2m\u001b[0m\u001b[36m.storybook/__tests__/HelloWorld.ci.jest.stories.js\u001b[39m\u001b[0m\u001b[2m:13:58)\u001b[2m\n      \u001b[2mat handle (\u001b[2mnode_modules/worker-farm/lib/child/index.js\u001b[2m:41:8)\u001b[2m\n      \u001b[2mat process.<anonymous> (\u001b[2mnode_modules/worker-farm/lib/child/index.js\u001b[2m:47:3)\u001b[2m\n      \u001b[2mat emitTwo (\u001b[2mevents.js\u001b[2m:106:13)\u001b[2m\n      \u001b[2mat process.emit (\u001b[2mevents.js\u001b[2m:191:7)\u001b[2m\n      \u001b[2mat process.nextTick (\u001b[2minternal/child_process.js\u001b[2m:744:12)\u001b[2m\n      \u001b[2mat _combinedTickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:67:7)\u001b[2m\n      \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:98:9)\u001b[2m\u001b[22m\n\n\u001b[1m\u001b[31m  \u001b[1m● \u001b[1mHelloWorld › story2 › Should have the Hello World label\u001b[39m\u001b[22m\n\n    Expected 'Hello World' to include 'Spec1'\n\u001b[2m      \n      \u001b[2mat assert (\u001b[2mnode_modules/expect/lib/assert.js\u001b[2m:29:9)\u001b[2m\n      \u001b[2mat Expectation.toInclude (\u001b[2mnode_modules/expect/lib/Expectation.js\u001b[2m:215:28)\u001b[2m\n      \u001b[2mat Object.<anonymous> (\u001b[2m\u001b[0m\u001b[36m.storybook/__tests__/HelloWorld.ci.jest.stories.js\u001b[39m\u001b[0m\u001b[2m:19:70)\u001b[2m\n      \u001b[2mat handle (\u001b[2mnode_modules/worker-farm/lib/child/index.js\u001b[2m:41:8)\u001b[2m\n      \u001b[2mat process.<anonymous> (\u001b[2mnode_modules/worker-farm/lib/child/index.js\u001b[2m:47:3)\u001b[2m\n      \u001b[2mat emitTwo (\u001b[2mevents.js\u001b[2m:106:13)\u001b[2m\n      \u001b[2mat process.emit (\u001b[2mevents.js\u001b[2m:191:7)\u001b[2m\n      \u001b[2mat process.nextTick (\u001b[2minternal/child_process.js\u001b[2m:744:12)\u001b[2m\n      \u001b[2mat _combinedTickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:67:7)\u001b[2m\n      \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:98:9)\u001b[2m\u001b[22m\n",
      "numFailingTests": 2,
      "numPassingTests": 0,
      "numPendingTests": 0,
      "perfStats": {
        "end": 1488870839487,
        "start": 1488870838541
      },
      "snapshot": {
        "added": 0,
        "fileDeleted": false,
        "matched": 0,
        "unchecked": 0,
        "unmatched": 0,
        "updated": 0
      },
      "testFilePath": "/Users/dev/Projects/Playground/storybook-addon-specifications/.storybook/__tests__/HelloWorld.ci.jest.stories.js",
      "testResults": [
        {
          "ancestorTitles": [
            "HelloWorld",
            "story1"
          ],
          "duration": 18,
          "failureMessages": [
            "Error: Expected 1 to be 2\n    at assert (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/expect/lib/assert.js:29:9)\n    at Expectation.toBe (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/expect/lib/Expectation.js:66:28)\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/.storybook/__tests__/HelloWorld.ci.jest.stories.js:13:58)\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:42:32)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:68:11)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at Spec.queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Spec.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:372:10)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2586:37)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at TreeProcessor.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2433:7)\n    at Env.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:780:17)\n    at jasmine2 (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/index.js:93:7)\n    at runTest (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-cli/build/runTest.js:53:10)\n    at module.exports.error (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-cli/build/TestWorker.js:62:5)\n    at handle (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/worker-farm/lib/child/index.js:41:8)\n    at process.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/worker-farm/lib/child/index.js:47:3)\n    at emitTwo (events.js:106:13)\n    at process.emit (events.js:191:7)\n    at process.nextTick (internal/child_process.js:744:12)\n    at _combinedTickCallback (internal/process/next_tick.js:67:7)\n    at process._tickCallback (internal/process/next_tick.js:98:9)"
          ],
          "fullName": "HelloWorld story1 Should have the Hello World label",
          "numPassingAsserts": 0,
          "status": "failed",
          "title": "Should have the Hello World label"
        },
        {
          "ancestorTitles": [
            "HelloWorld",
            "story2"
          ],
          "duration": 3,
          "failureMessages": [
            "Error: Expected 'Hello World' to include 'Spec1'\n    at assert (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/expect/lib/assert.js:29:9)\n    at Expectation.toInclude (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/expect/lib/Expectation.js:215:28)\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/.storybook/__tests__/HelloWorld.ci.jest.stories.js:19:70)\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:42:32)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:68:11)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at Spec.queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Spec.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:372:10)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2586:37)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at onComplete (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2574:17)\n    at QueueRunner.clearStack (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:681:9)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1951:12)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at complete (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:384:9)\n    at QueueRunner.clearStack (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:681:9)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1951:12)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1989:9)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:68:11)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at Spec.queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Spec.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:372:10)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2586:37)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at TreeProcessor.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2433:7)\n    at Env.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:780:17)\n    at jasmine2 (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/index.js:93:7)\n    at runTest (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-cli/build/runTest.js:53:10)\n    at module.exports.error (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-cli/build/TestWorker.js:62:5)\n    at handle (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/worker-farm/lib/child/index.js:41:8)\n    at process.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/worker-farm/lib/child/index.js:47:3)\n    at emitTwo (events.js:106:13)\n    at process.emit (events.js:191:7)\n    at process.nextTick (internal/child_process.js:744:12)\n    at _combinedTickCallback (internal/process/next_tick.js:67:7)\n    at process._tickCallback (internal/process/next_tick.js:98:9)"
          ],
          "fullName": "HelloWorld story2 Should have the Hello World label",
          "numPassingAsserts": 0,
          "status": "failed",
          "title": "Should have the Hello World label"
        }
      ],
      "skipped": false
    },
    {
      "console": null,
      "failureMessage": "\u001b[1m\u001b[31m  \u001b[1m● \u001b[1mHelloWorld › story2 › Should have the Hello World label\u001b[39m\u001b[22m\n\n    Expected 'Hello World' to include 'Spec1'\n\u001b[2m      \n      \u001b[2mat assert (\u001b[2mnode_modules/expect/lib/assert.js\u001b[2m:29:9)\u001b[2m\n      \u001b[2mat Expectation.toInclude (\u001b[2mnode_modules/expect/lib/Expectation.js\u001b[2m:215:28)\u001b[2m\n      \u001b[2mat Object.<anonymous> (\u001b[2m\u001b[0m\u001b[36m.storybook/__tests__/HelloWorldBoup.ci.jest.stories.js\u001b[39m\u001b[0m\u001b[2m:18:70)\u001b[2m\n      \u001b[2mat handle (\u001b[2mnode_modules/worker-farm/lib/child/index.js\u001b[2m:41:8)\u001b[2m\n      \u001b[2mat process.<anonymous> (\u001b[2mnode_modules/worker-farm/lib/child/index.js\u001b[2m:47:3)\u001b[2m\n      \u001b[2mat emitTwo (\u001b[2mevents.js\u001b[2m:106:13)\u001b[2m\n      \u001b[2mat process.emit (\u001b[2mevents.js\u001b[2m:191:7)\u001b[2m\n      \u001b[2mat process.nextTick (\u001b[2minternal/child_process.js\u001b[2m:744:12)\u001b[2m\n      \u001b[2mat _combinedTickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:67:7)\u001b[2m\n      \u001b[2mat process._tickCallback (\u001b[2minternal/process/next_tick.js\u001b[2m:98:9)\u001b[2m\u001b[22m\n",
      "numFailingTests": 1,
      "numPassingTests": 1,
      "numPendingTests": 0,
      "perfStats": {
        "end": 1488870839523,
        "start": 1488870838572
      },
      "snapshot": {
        "added": 0,
        "fileDeleted": false,
        "matched": 0,
        "unchecked": 0,
        "unmatched": 0,
        "updated": 0
      },
      "testFilePath": "/Users/dev/Projects/Playground/storybook-addon-specifications/.storybook/__tests__/HelloWorldBoup.ci.jest.stories.js",
      "testResults": [
        {
          "ancestorTitles": [
            "HelloWorld",
            "story1"
          ],
          "duration": 19,
          "failureMessages": [],
          "fullName": "HelloWorld story1 Should have the Hello World label",
          "numPassingAsserts": 0,
          "status": "passed",
          "title": "Should have the Hello World label"
        },
        {
          "ancestorTitles": [
            "HelloWorld",
            "story2"
          ],
          "duration": 3,
          "failureMessages": [
            "Error: Expected 'Hello World' to include 'Spec1'\n    at assert (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/expect/lib/assert.js:29:9)\n    at Expectation.toInclude (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/expect/lib/Expectation.js:215:28)\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/.storybook/__tests__/HelloWorldBoup.ci.jest.stories.js:18:70)\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:42:32)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:68:11)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at Spec.queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Spec.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:372:10)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2586:37)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at onComplete (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2574:17)\n    at QueueRunner.clearStack (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:681:9)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1951:12)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at complete (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:384:9)\n    at QueueRunner.clearStack (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:681:9)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1951:12)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at Object.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:47:11)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1968:16\n    at /Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1911:9\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/jasmine-async.js:68:11)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at Spec.queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Spec.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:372:10)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2586:37)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at Object.fn (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2571:13)\n    at attemptAsync (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1986:24)\n    at QueueRunner.run (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1941:9)\n    at QueueRunner.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:1929:10)\n    at queueRunnerFactory (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:718:35)\n    at TreeProcessor.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:2433:7)\n    at Env.execute (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/vendor/jasmine-2.5.2.js:780:17)\n    at jasmine2 (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-jasmine2/build/index.js:93:7)\n    at runTest (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-cli/build/runTest.js:53:10)\n    at module.exports.error (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/jest-cli/build/TestWorker.js:62:5)\n    at handle (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/worker-farm/lib/child/index.js:41:8)\n    at process.<anonymous> (/Users/dev/Projects/Playground/storybook-addon-specifications/node_modules/worker-farm/lib/child/index.js:47:3)\n    at emitTwo (events.js:106:13)\n    at process.emit (events.js:191:7)\n    at process.nextTick (internal/child_process.js:744:12)\n    at _combinedTickCallback (internal/process/next_tick.js:67:7)\n    at process._tickCallback (internal/process/next_tick.js:98:9)"
          ],
          "fullName": "HelloWorld story2 Should have the Hello World label",
          "numPassingAsserts": 0,
          "status": "failed",
          "title": "Should have the Hello World label"
        }
      ],
      "skipped": false
    }
  ],
  "wasInterrupted": false
}

testFilePath is there.

ndelangen commented 7 years ago

Made a tiny bit progress today: https://github.com/mthuret/storybook-addon-specifications/compare/jest-test-files...ndelangen:jest-test-files

mthuret commented 7 years ago

@ndelangen that's super nice o/

ndelangen commented 7 years ago

I added websockets to the POC 💯 ! Adding websockets to the same port as storybook is running on proved to be impossible, since storybook does not expose the express app to the middleware. So what I've done so far is add a route via middleware which can be used to retrieve a websocket url, and then the client can connect and receive updates.

ndelangen commented 7 years ago

Let me know if you want to have this as a PR or share access to the fork/branch if you feel like working on this together?

ndelangen commented 7 years ago

Created a WIP PR https://github.com/mthuret/storybook-addon-specifications/pull/32

philipbeadle commented 6 years ago

I'd really like to get my Jest tests running in a terminal while the specs also run in the Storybook. This tool is amazing, makes TDD super easy to do.

jonwilliams-bluescape commented 5 years ago

2019 is calling and is curious what happened? :)

GastroGeek commented 5 years ago

I made this (demo repo), which I feel is a pretty 'clean' way of getting things working in both... there might be some redundant rubbish in there as I pulled it from my project but maybe it helps someone 🤷‍♂

https://github.com/GastroGeek/storybook-vue-specs-jest-testing