Skip to content

Conversation

@phillipj
Copy link
Member

This smoke test will verify there's no errors being generated when running the build process. The test simply executes build.js and asserts there were no errors raised from the child process. As most of the current code base lacks test coverage atm, this will hopefully provide some confidence that the build process will not explode - that has happened with more than once with incoming PRs.

Also did some minor package.json test script refactoring for better readability.

What it would look like when running the tests and some bad SASS syntax error got introduced by accident:

➜ npm run test:smoke

> nodejs.org@1.0.0 test:smoke /nodejs.org
> tape tests/*.smoketest.js | faucet

✓ build.js
⨯ should not generate error
  not ok 1 should be equal
    ---
      operator: equal
      expected: |-
        null
      actual: |-
        { [Error: Command failed: /bin/sh -c node /nodejs.org/build.js

  /nodejs.org/build.js:203
      if (err) { throw err }
                 ^
  CssSyntaxError: /nodejs.org/styles.styl:1:144: Unknown word
      at Input.error (/nodejs.org/node_modules/autoprefixer-stylus/node_modules/postcss/lib/input.js:61:21)
      at Parser.unknownWord (/nodejs.org/node_modules/autoprefixer-stylus/node_modules/postcss/lib/parser.js:479:26)
      ...

Closes #225

This smoke test will verify there's no errors being
generated when running the build process.

+ minor package.json test script refactoring for increased readability
@ghost
Copy link

ghost commented Jan 11, 2016

LGTM, merged!

ghost pushed a commit that referenced this pull request Jan 11, 2016
Created smoke test for the build process
@ghost ghost merged commit e90de03 into master Jan 11, 2016
@phillipj phillipj deleted the create-smoketest branch January 11, 2016 20:01
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ideas on smoketesting

2 participants