• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

helpscout / helix / 91
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: dependabot/npm_and_yarn/hosted-git-info-2.8.9
DEFAULT BRANCH: master
Ran 16 Nov 2017 04:18PM UTC
Jobs 1
Files 13
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
91

push

travis-ci

ItsJonQ
Add beforeGenerate and afterGenerate hooks

This update adds two new hook methods to `HelixSpec`: `beforeGenerate`
and `afterGenerate`.

These hooks allow you easily to adjust the shape/fixture data of
your specs, which can be handy for create alternate specs.

**Example: `afterGenerate()`**

```js
const Dinosaur = createSpec({
  id: faker.random.number(),
  name: faker.name.firstName(),
  location: faker.address.country()
})

Dinosaur.afterGenerate(data => {
  const { name } = data
  return {
    name,
    location: 'Mexico',
    status: 'Happy',
    email: 'noop@superprivacy.com'
  }
})

Dinosaur.generate()
// {
//   name: 'Alice',
//   location: 'Mexico'
//   status: 'Happy',
//   email: 'noop@superprivacy.com'
// }
```

89 of 89 branches covered (100.0%)

Branch coverage included in aggregate %.

118 of 118 relevant lines covered (100.0%)

28832.14 hits per line

Jobs
ID Job ID Ran Files Coverage
1 91.1 16 Nov 2017 04:18PM UTC 0
100.0
Travis Job 91.1
Source Files on build 91
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #91
  • 40d75231 on github
  • Next Build on before-after-generate (#92)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc