Git Product home page Git Product logo

sequelize-test-helpers's Introduction

Horizontal Logo

A collection of utilities to help with unit-testing Sequelize models and code that needs those models.

NPM

Related Projects

How to use

Prerequisites

This library assumes:

  1. You are using chai — Version 4 or better.
  2. You are using sinon — Version 5 or better.
  3. Using mocha is also recommended, but as long as you are using chai and sinon this should work with any test runner.

Note Jest is not supported unless you are also using sinon and chai, which is unlikely.

Installation

Add sequelize-test-helpers as a devDependency:

npm i -D sequelize-test-helpers

Examples

Unit testing models created with sequelize.define

Note: See below for how to test models created using Model.init

Let's say you have a Sequelize model User as follows:

src/models/User.js

const model = (sequelize, DataTypes) => {
  const User = sequelize.define(
    'User',
    {
      age: {
        type: DataTypes.INTEGER.UNSIGNED
      },
      firstName: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: true
        }
      },
      lastName: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: true
        }
      },
      email: {
        type: DataTypes.STRING,
        allowNull: false,
        unique: true,
        lowercase: true,
        validate: {
          isEmail: true,
          notEmpty: true
        }
      },
      token: {
        type: DataTypes.STRING,
        validate: {
          notEmpty: true
        }
      }
    },
    {
      indexes: [
        { unique: true, fields: ['email'] },
        { unique: true, fields: ['token'] },
        { unique: false, fields: ['firstName', 'lastName'] }
      ]
    }
  )

  User.associate = ({ Company }) => {
    User.belongsTo(Company)
  }

  return User
}

module.exports = model

You can use sequelize-test-helpers to unit-test this with mocha as follows:

test/unit/models/User.spec.js

const { expect } = require('chai')

const {
  sequelize,
  dataTypes,
  checkModelName,
  checkUniqueIndex,
  checkPropertyExists
} = require('sequelize-test-helpers')

const UserModel = require('../../src/models/User')

describe('src/models/User', () => {
  const User = UserModel(sequelize, dataTypes)
  const user = new User()

  checkModelName(User)('User')

  context('properties', () => {
    ;['age', 'firstName', 'lastName', 'email', 'token'].forEach(checkPropertyExists(user))
  })

  context('associations', () => {
    const Company = 'some dummy company'

    before(() => {
      User.associate({ Company })
    })

    it('defined a belongsTo association with Company', () => {
      expect(User.belongsTo).to.have.been.calledWith(Company)
    })
  })

  context('indexes', () => {
    context('unique', () => {
      ;['email', 'token'].forEach(checkUniqueIndex(user))
    })

    context('non unique (and also composite in this example)', () => {
      ;[['firstName', 'lastName']].forEach(checkNonUniqueIndex(user))
    })
  })
})

Built-in checks

Check What it does
checkHookDefined Checks that a particular hook is defined.
checkModelName Checks that the model is named correctly.
checkNonUniqueIndex Checks that a specific non-unique index is defined.
checkPropertyExists Checks that the model has defined the given property.
checkUniqueIndex Checks that a specific unique index is defined.

Deprecation notice

Check Note
checkUniqueCompoundIndex Use either checkUniqueIndex or checkNonUniqueIndex

Checking associations

The various association functions are stubbed so you can simply invoke the the model's associate function in a before block then use sinon's standard expectation syntax to check they were called with the correct values.

hasOne

it("defined a hasOne association with Image as 'profilePic'", () => {
  expect(User.hasOne).to.have.been.calledWith(Image, {
    as: 'profilePic'
  })
})

belongsTo

it('defined a belongsTo association with Company', () => {
  expect(User.belongsTo).to.have.been.calledWith(Company)
})

hasMany

it("defined a hasMany association with User as 'employees'", () => {
  expect(Company.hasMany).to.have.been.calledWith(User, {
    as: 'employees'
  })
})

belongsToMany

it("defined a belongsToMany association with Category through CategoriesCompanies as 'categories'", () => {
  expect(Company.belongsToMany).to.have.been.calledWith(Category, {
    through: CategoriesCompanies,
    as: 'categories'
  })
})

Unit testing code that requires models

Let's say you have a utility function that takes some data and uses it to update a user record. If the user does not exist it returns null. (Yes I know this is a contrived example)

src/utils/save.js

const { User } = require('../models')

const save = async ({ id, ...data }) => {
  const user = await User.findOne({ where: { id } })
  if (user) return await user.update(data)
  return null
}

module.exports = save

You want to unit-test this without invoking a database connection (so you can't require('src/models') in your test).

This is where makeMockModels, sinon, and proxyquire come in handy.

test/unit/utils/save.test.js

const { expect } = require('chai')
const { match, stub, resetHistory } = require('sinon')
const proxyquire = require('proxyquire')

const { makeMockModels } = require('sequelize-test-helpers')

describe('src/utils/save', () => {
  const User = { findOne: stub() }
  const mockModels = makeMockModels({ User })

  const save = proxyquire('../../../src/utils/save', {
    '../models': mockModels
  })

  const id = 1
  const data = {
    firstName: 'Testy',
    lastName: 'McTestFace',
    email: 'testy.mctestface.test.tes',
    token: 'some-token'
  }
  const fakeUser = { id, ...data, update: stub() }

  let result

  context('user does not exist', () => {
    before(async () => {
      User.findOne.resolves(undefined)
      result = await save({ id, ...data })
    })

    after(resetHistory)

    it('called User.findOne', () => {
      expect(User.findOne).to.have.been.calledWith(match({ where: { id } }))
    })

    it("didn't call user.update", () => {
      expect(fakeUser.update).not.to.have.been.called
    })

    it('returned null', () => {
      expect(result).to.be.null
    })
  })

  context('user exists', () => {
    before(async () => {
      fakeUser.update.resolves(fakeUser)
      User.findOne.resolves(fakeUser)
      result = await save({ id, ...data })
    })

    after(resetHistory)

    it('called User.findOne', () => {
      expect(User.findOne).to.have.been.calledWith(match({ where: { id } }))
    })

    it('called user.update', () => {
      expect(fakeUser.update).to.have.been.calledWith(match(data))
    })

    it('returned the user', () => {
      expect(result).to.deep.equal(fakeUser)
    })
  })
})

As a convenience, makeMockModels will automatically populate your mockModels with mocks of all of the models defined in your src/models folder (or if you have a .sequelizerc file it will look for the models-path in that). Simply override any of the specific models you need to do stuff with.

Testing models created with Model.init

Sequelize also allows you to create models by extending Sequelize.Model and invoking its static init function as follows:

Note: creating your models this way makes it harder to test their use.

const { Model, DataTypes } = require('sequelize')

const factory = sequelize => {
  class User extends Model {}
  User.init(
    {
      firstName: DataTypes.STRING,
      lastName: DataTypes.STRING
    },
    { sequelize, modelName: 'User' }
  )
  return User
}

module.exports = factory

You can test this using sequelize-test-helpers, sinon, and proxyquire.

const { expect } = require('chai')
const { spy } = require('sinon')
const proxyquire = require('proxyquire')
const { sequelize, Sequelize } = require('sequelize-test-helpers')

describe('src/models/User', () => {
  const { DataTypes } = Sequelize

  const UserFactory = proxyquire('src/models/User', {
    sequelize: Sequelize
  })

  let User

  before(() => {
    User = UserFactory(sequelize)
  })

  // It's important you do this
  after(() => {
    User.init.resetHistory()
  })

  it('called User.init with the correct parameters', () => {
    expect(User.init).to.have.been.calledWith(
      {
        firstName: DataTypes.STRING,
        lastName: DataTypes.STRING
      },
      {
        sequelize,
        modelName: 'User'
      }
    )
  })
})

Listing your models

Assuming your src/models/index.js (or your equivalent) exports all your models, it's useful to be able to generate a list of their names.

const { listModels } = require('sequelize-test-helpers')

console.log(listModels()) // will spit out a list of your model names.

Similarly to makeMockModels above, listModels will find all of the models defined in your src/models folder (or if you have a .sequelizerc file it will look for the models-path in that).

Custom models paths and custom file suffixes

By default makeMockModels and listModels will both look for your models in files ending with .js in either the models path defined in .sequelizerc, or in src/models. If however your models are not .js files and the models folder is somewhere else you can pass in a custom models folder path and a custom suffix.

  • listModels(customModelsFolder, customSuffix)

    const modelNames = listModels('models', '.ts')
  • makeMockModels(yourCustomModels, customModelsFolder, customSuffix)

    const models = makeMockModels({ User: { findOne: stub() } }, 'models', '.ts')

Development

Branches

Branch Status Coverage Audit Notes
develop CircleCI codecov Vulnerabilities Work in progress
main CircleCI codecov Vulnerabilities Latest stable release

Development Prerequisites

  • NodeJS. I use nvm to manage Node versions — brew install nvm.

Initialisation

npm install

Test it

  • npm test — runs the unit tests
  • npm run test:unit:cov — runs the unit tests with code coverage

Lint it

npm run lint

Contributing

Please see the contributing notes.

Thanks

sequelize-test-helpers's People

Contributors

bmw2621 avatar davesag avatar dependabot[bot] avatar gerhardkubion avatar greenkeeper[bot] avatar greenkeeperio-bot avatar odub avatar stam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sequelize-test-helpers's Issues

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.0.0 to 6.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v6.0.1

6.0.1 / 2019-02-21

The obligatory round of post-major-release bugfixes.

🐛 Fixes

These issues were regressions.

  • #3754 - Mocha again finds test.js when run without arguments (@plroebuck)
  • #3756 - Mocha again supports third-party interfaces via --ui (@boneskull)
  • #3755 - Fix broken --watch (@boneskull)
  • #3759 - Fix unwelcome deprecation notice when Mocha run against languages (CoffeeScript) with implicit return statements; returning a non-undefined value from a describe callback is no longer considered deprecated (@boneskull)

📖 Documentation

Commits

The new version differs by 9 commits.

  • 6d3d6b4 Release v6.0.1
  • 2146ece update CHANGELOG.md for v6.0.1
  • 7c9221d backout deprecation of value returned from suite; closes #3744
  • b7cfceb fix --watch not finding any files to execute; closes #3748
  • b836d73 Upgrade docdash version - issue #3663
  • 7926f47 fix --ui issues, closes #3746
  • 00f2ed9 dev dep upgrades from "npm audit" and "npm upgrade"
  • 34afb1a fix(cli/run.js): Revert default glob to match Mocha-5.2
  • 6d5a0db Bring the example congfiguration file in line with the documentation. (#3751)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @stryker-mutator/javascript-mutator is breaking the build 🚨

The devDependency @stryker-mutator/javascript-mutator was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/javascript-mutator is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 3 commits.

  • 2b55933 v1.3.1
  • 73fc0a8 fix(clean up): prevent sandbox creation after dispose (#1527)
  • 3e21a8a build(deps): update rxjs requirement from ~6.3.0 to ~6.5.1 (#1524)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lint-staged is breaking the build 🚨

The devDependency lint-staged was updated from 8.1.5 to 8.1.6.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lint-staged is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v8.1.6

8.1.6 (2019-05-03)

Bug Fixes

Commits

The new version differs by 2 commits.

  • 0984524 fix: update yup to 0.27.0 (#607)
  • e0c8aff chore: fix typo in package.json (#603)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

The devDependency nyc was updated from 13.1.0 to 13.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nyc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 17 commits.

  • 29e6f5e chore(release): 13.2.0
  • e95856c chore: Update dependencies. (#978)
  • 921d386 fix: Create directory for merge destination. (#979)
  • df2730d feat: Option Plugins (#948)
  • 35cd49a feat: document the fact that cacheDir is configurable (#968)
  • ff834aa feat: avoid hardcoded HOME for spawn-wrap working dir (#957)
  • 35710b1 build: move windows tests to travis (#961)
  • 93cb5c1 tests: coverage for temp-dir changes (#964)
  • d566efe test: stop using LAZY_LOAD_COUNT (#960)
  • f23d474 chore: update stale bot config with feedback (#958)
  • 62d7fb8 chore: slight tweak to position of test
  • 28b6d09 fix: missing command temp-directory (#928)
  • 40afc5f fix: nyc processing files not covered by include when all is enabled. (#914)
  • ba22a26 docs(readme): Update to reflect .nycrc.json support (#934)
  • 2dbb82d chore: enable probot-stale

There are 17 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ajv is breaking the build 🚨

The devDependency ajv was updated from 6.6.2 to 6.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v6.7.0

Option useDefaults: "empty" to replace null and "" (empty strings) with default values.
Update draft-04 meta-schema to remove incorrect usage of "uri" format.

Commits

The new version differs by 17 commits.

There are 17 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

The devDependency eslint was updated from 5.15.1 to 5.15.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v5.15.2
  • 29dbca7 Fix: implicit-arrow-linebreak adds extra characters (fixes #11268) (#11407) (Mark de Dios)
  • 5d2083f Upgrade: [email protected] (#11513) (Teddy Katz)
  • a5dae7c Fix: Empty glob pattern incorrectly expands to "/**" (#11476) (Ben Chauvette)
  • 448e8da Chore: improve crash reporting (fixes #11304) (#11463) (Alex Zherdev)
  • 0f56dc6 Chore: make config validator params more consistent (#11435) (薛定谔的猫)
  • d6c1122 Docs: Add working groups to maintainer guide (#11400) (Nicholas C. Zakas)
  • 5fdb4d3 Build: compile deps to ES5 when generating browser file (fixes #11504) (#11505) (Teddy Katz)
  • 06fa165 Build: update CI testing configuration (#11500) (Reece Dunham)
  • 956e883 Docs: Fix example in no-restricted-modules docs (#11454) (Paul O’Shannessy)
  • 2c7431d Docs: fix json schema example dead link (#11498) (kazuya kawaguchi)
  • e7266c2 Docs: Fix invalid JSON in "Specifying Parser Options" (#11492) (Mihira Jayasekera)
  • 6693161 Sponsors: Sync README with website (ESLint Jenkins)
  • 62fee4a Chore: eslint-config-eslint enable comma-dangle functions: "never" (#11434) (薛定谔的猫)
  • 34a5382 Build: copy bundled espree to website directory (#11478) (Pig Fang)
  • f078f9a Chore: use "file:" dependencies for internal rules/config (#11465) (Teddy Katz)
  • 0756128 Docs: Add visualstudio to formatter list (#11480) (Patrick Eriksson)
  • 44de9d7 Docs: Fix typo in func-name-matching rule docs (#11484) (Iulian Onofrei)
Commits

The new version differs by 19 commits.

  • f354770 5.15.2
  • cada7a1 Build: changelog update for 5.15.2
  • 29dbca7 Fix: implicit-arrow-linebreak adds extra characters (fixes #11268) (#11407)
  • 5d2083f Upgrade: [email protected] (#11513)
  • a5dae7c Fix: Empty glob pattern incorrectly expands to "/**" (#11476)
  • 448e8da Chore: improve crash reporting (fixes #11304) (#11463)
  • 0f56dc6 Chore: make config validator params more consistent (#11435)
  • d6c1122 Docs: Add working groups to maintainer guide (#11400)
  • 5fdb4d3 Build: compile deps to ES5 when generating browser file (fixes #11504) (#11505)
  • 06fa165 Build: update CI testing configuration (#11500)
  • 956e883 Docs: Fix example in no-restricted-modules docs (#11454)
  • 2c7431d Docs: fix json schema example dead link (#11498)
  • e7266c2 Docs: Fix invalid JSON in "Specifying Parser Options" (#11492)
  • 6693161 Sponsors: Sync README with website
  • 62fee4a Chore: eslint-config-eslint enable comma-dangle functions: "never" (#11434)

There are 19 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-import is breaking the build 🚨

The devDependency eslint-plugin-import was updated from 2.17.1 to 2.17.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-import is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 5 commits.

  • eddcfa9 Bump to v2.17.2
  • b151d04 [fix] no-unused-modules: avoid crash when using ignoreExports-option
  • 3512563 [fix] no-unused-modules: make sure that rule with no options will not fail
  • 8e0c021 [Test] no-unused-modules add failing test case
  • 9b7a970 [meta] add npm run mocha for easier unit testing

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lint-staged is breaking the build 🚨

The devDependency lint-staged was updated from 8.1.6 to 8.1.7.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lint-staged is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v8.1.7

8.1.7 (2019-05-15)

Bug Fixes

  • Resolve security vulnerability in dependencies (#615) (315890a), closes #600
Commits

The new version differs by 2 commits.

  • 315890a fix: Resolve security vulnerability in dependencies (#615)
  • cbf0e0e docs: Correct section about filtering files (#612)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-mocha is breaking the build 🚨

The devDependency eslint-plugin-mocha was updated from 5.2.0 to 5.2.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for 5.2.1

Bug Fixes

  • Remove invalid test-cases and unreachable code from prefer-arrow-callback (#186)
  • Fix invalid syntax in test case (#182)

Documentation

  • Fixing typo (#184)
  • Replace warning with warn (#181)

Dependency Upgrades

  • Update dependencies (#187)
  • Update eslint-plugin-node to the latest version 🚀 (#173)
Commits

The new version differs by 13 commits.

  • 27fa81c 5.2.1
  • 8234a2c Merge pull request #187 from lo1tuma/update-deps
  • 784cb1e Update dependencies
  • bfed921 Merge pull request #184 from nagygergo/patch-1
  • 4671611 Fixing typo
  • d80a7fd Merge pull request #186 from lo1tuma/fix-prefer-arrow-callback
  • b19ae5d Remove invalid test-cases and unreachable code from prefer-arrow-callback
  • 9950901 Merge pull request #173 from lo1tuma/greenkeeper/eslint-plugin-node-7.0.0
  • 5b7f988 Merge pull request #182 from lo1tuma/fix-test
  • 798efa0 Fix invalid syntax in test case
  • 8ad5267 Merge pull request #181 from Drapegnik/master
  • abd0f9b docs: replace warning with warn
  • d5ab073 chore(package): update eslint-plugin-node to version 7.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

No TypeScript type definitions

Project needs tome typedefs, if anyone has written some they'd like to share would be great, otherwise I'll PR whatever I come up with

An in-range update of eslint-config-prettier is breaking the build 🚨

The devDependency eslint-config-prettier was updated from 3.0.1 to 3.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 8 commits.

  • 3f31f8e eslint-config-prettier v3.1.0
  • 8f1f42d Add CLI sanity check when there are warnings
  • 9d7c195 Clarify test-lint
  • 425a9ff Add support for eslint-plugin-unicorn
  • 8d264cd Allow using the quotes rule to forbid unnecessary backticks
  • c45b794 Update dependencies
  • 291a4ed Pin devDependencies
  • 7819e43 Update dependencies

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-config-prettier is breaking the build 🚨

The devDependency eslint-config-prettier was updated from 3.4.0 to 3.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 4 commits.

  • 261d47c eslint-config-prettier v3.5.0
  • a3275ee Update dependencies
  • 9072c91 Add new Vue rules coming in the next eslint-plugin-vue version
  • 6c4d1f0 Revert the Vue changes from commit 089a7b53 (PR #69)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of prettier is breaking the build 🚨

The devDependency prettier was updated from 1.16.4 to 1.17.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for Prettier 1.17: More quotes options and support for shared configs

🔗 Release Notes

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-prettier is breaking the build 🚨

The devDependency eslint-plugin-prettier was updated from 2.6.2 to 2.7.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 3 commits.

  • 869f56d Build: update package.json and changelog for v2.7.0
  • 38537ba Update: Support prettierignore and custom processors (#111)
  • 047dc8f Build: switch to release script package

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

logo contribution

Hi again @davesag I've reviewed your pinned repositories. i found a logo idea for this repo. What do you think?

sq

Accessing stubbed functions on Models results in "received value must be a mock or spy function"

Hello

I'm integrating sequelize-test-helpers in my unit tests, but I'm having some trouble testing the stubbed functions in the Models.
When I run this test:

describe("OptionCategory model", () => {
    const OptionCategory = OptionCategoryFactory(sequelize, dataTypes);
    OptionCategory.associate = ({ OptionKind }) => {
        OptionCategory.belongsTo(OptionKind);
    };
    it('defined a hasMany association with OptionCategory as "optionCategories"', () => {
        console.log("OptionCategory.belongsTo is", OptionCategory.belongsTo); // <-- this returns "spy" !
        expect(OptionCategory.belongsTo).toHaveBeenCalled();
    });
});

I get

Matcher error: received value must be a mock or spy function

    Received has type:  function
    Received has value: [Function anonymous]

Even though OptionCategory.belongsTo prints out as spy. I really don't understand why jest isn't taking it...
This happens with all stubbed functions, by default or by me using sinon.

Here's a link to the test file in my (work in progress) repo, for context:
https://bitbucket.org/dyte/authentic-catalog-api/src/master/tests/unit/models/optionCategory.ts

Thanks a lot for any hints!
Dieter

An in-range update of @stryker-mutator/mocha-framework is breaking the build 🚨

The devDependency @stryker-mutator/mocha-framework was updated from 1.2.0 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/mocha-framework is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).
  • codecov/project: No report found to compare against (Details).
  • codecov/patch: Coverage not affected. (Details).

Commits

The new version differs by 26 commits.

  • f42a70f v1.3.0
  • b4336fb feat(files): use mocha 6's way of resolving files (#1512)
  • 31ee085 fix(dispose): clean up child processes in alternative flows (#1520)
  • 3c83bbe feat(onScoreCalculated): deprecate onScoreCalculated reporter event (#1513)
  • baa374d feat(mocha 6): support all config formats (#1511)
  • fd399a8 docs: specify minimum NodeJS version (#1510)
  • 70ffa61 build: use fs instead of mz in performance tests (#1507)
  • 025fe9d build(deps-dev): update nyc requirement from ^13.0.1 to ^14.0.0 (#1505)
  • b282291 Merge pull request #1504 from stryker-mutator/dependabot/npm_and_yarn/tslint-approx-5.16.0
  • 04e7e0b build(deps-dev): update tslint requirement from ~5.15.0 to ~5.16.0
  • 955dc42 Merge pull request #1496 from stryker-mutator/dependabot/npm_and_yarn/inquirer-approx-6.3.1
  • c74e98e build(deps): update inquirer requirement from ~6.2.0 to ~6.3.1
  • dd72bac Merge pull request #1495 from stryker-mutator/dependabot/npm_and_yarn/prettier-approx-1.17.0
  • b7e68d0 build(deps-dev): update webpack requirement from ~4.29.1 to ~4.30.0 (#1497)
  • 90307e7 build(deps): update istanbul-lib-instrument requirement (#1500)

There are 26 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @stryker-mutator/javascript-mutator is breaking the build 🚨

The devDependency @stryker-mutator/javascript-mutator was updated from 1.2.0 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/javascript-mutator is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 26 commits.

  • f42a70f v1.3.0
  • b4336fb feat(files): use mocha 6's way of resolving files (#1512)
  • 31ee085 fix(dispose): clean up child processes in alternative flows (#1520)
  • 3c83bbe feat(onScoreCalculated): deprecate onScoreCalculated reporter event (#1513)
  • baa374d feat(mocha 6): support all config formats (#1511)
  • fd399a8 docs: specify minimum NodeJS version (#1510)
  • 70ffa61 build: use fs instead of mz in performance tests (#1507)
  • 025fe9d build(deps-dev): update nyc requirement from ^13.0.1 to ^14.0.0 (#1505)
  • b282291 Merge pull request #1504 from stryker-mutator/dependabot/npm_and_yarn/tslint-approx-5.16.0
  • 04e7e0b build(deps-dev): update tslint requirement from ~5.15.0 to ~5.16.0
  • 955dc42 Merge pull request #1496 from stryker-mutator/dependabot/npm_and_yarn/inquirer-approx-6.3.1
  • c74e98e build(deps): update inquirer requirement from ~6.2.0 to ~6.3.1
  • dd72bac Merge pull request #1495 from stryker-mutator/dependabot/npm_and_yarn/prettier-approx-1.17.0
  • b7e68d0 build(deps-dev): update webpack requirement from ~4.29.1 to ~4.30.0 (#1497)
  • 90307e7 build(deps): update istanbul-lib-instrument requirement (#1500)

There are 26 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

The devDependency sinon was updated from 7.2.4 to 7.2.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 8 commits.

  • 8b8bddd Update docs/changelog.md and set new release id in docs/_config.yml
  • 33f0b67 Add release documentation for v7.2.5
  • 2b4bc7d 7.2.5
  • fb54e29 Update CHANGELOG.md and AUTHORS for new release
  • 8ac68f3 Upgrade mochify to latest
  • add43e3 Upgrade @sinonjs/samsam to latest
  • d0c073c don't call extends.nonEnum in spy.resetHistory (#1984)
  • f99e2ef Use stable Chrome in Circle

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-promise is breaking the build 🚨

The devDependency eslint-plugin-promise was updated from 4.0.1 to 4.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-promise is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

The devDependency sinon was updated from 7.3.0 to 7.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 6 commits.

  • 3812a7d Update docs/changelog.md and set new release id in docs/_config.yml
  • 93bef55 Add release documentation for v7.3.1
  • e02c192 7.3.1
  • 8ee1d35 Update CHANGELOG.md and AUTHORS for new release
  • bc53d82 Fix security issues
  • 1a09166 Update @sinonjs/samsam to v3.3.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of husky is breaking the build 🚨

The devDependency husky was updated from 1.1.1 to 1.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

husky is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 9 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-config-prettier is breaking the build 🚨

The devDependency eslint-config-prettier was updated from 3.1.0 to 3.2.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-config-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 13 commits.

  • aad5bd9 eslint-config-prettier v3.2.0
  • 34d1fbd Fix missing words in README.md
  • 8036d25 Work around bad link handling in doctoc
  • 351d791 Add support for eslint-plugin-vue
  • e47404c Add table of contents
  • 2c60901 Document no-sequences gotcha
  • 9b6bb18 Work around an npm bug for Node.js 6
  • 807a189 Update dependencies
  • a62f091 Bump eslint-plugin-prettier from 2.6.2 to 3.0.0 (#61)
  • 0ccf052 Bump eslint-config-google from 0.10.0 to 0.11.0 (#62)
  • 25e622d Bump babel-eslint from 9.0.0 to 10.0.1 (#60)
  • a240928 Bump eslint from 5.6.0 to 5.8.0 (#59)
  • d409a3b Bump prettier from 1.14.3 to 1.15.1 (#58)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of husky is breaking the build 🚨

The devDependency husky was updated from 1.1.2 to 1.1.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

husky is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 8 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ajv is breaking the build 🚨

The devDependency ajv was updated from 6.9.1 to 6.9.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 11 commits.

  • 2aa49ae 6.9.2
  • dffe473 chore(package): update mocha to version 6.0.0 (#952)
  • 6831b68 feat: extract method to validate custom keyword definition
  • 187e021 fix: removeAdditional option breaking custom keywords, closes #955, closes epoberezkin/ajv-keywords#91
  • f6d25de Replace single quotes with double quotes to get build scripts running on Windows (#946)
  • c52f2e1 update package.json scripts
  • 098df6d test: enable browser tests in node 10
  • 8720547 skip browser tests
  • a7f78f2 refactor: split issues.spec.js file
  • 71dc5dc refactor: split options.spec.js file
  • 51685b8 chore(package): update nyc to version 13.2.0 (#930)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @stryker-mutator/mocha-framework is breaking the build 🚨

The devDependency @stryker-mutator/mocha-framework was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/mocha-framework is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 3 commits.

  • 2b55933 v1.3.1
  • 73fc0a8 fix(clean up): prevent sandbox creation after dispose (#1527)
  • 3e21a8a build(deps): update rxjs requirement from ~6.3.0 to ~6.5.1 (#1524)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ajv is breaking the build 🚨

The devDependency ajv was updated from 6.8.1 to 6.9.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v6.9.0

OpenAPI keyword nullable can be any boolean (and not only true).
Custom keyword definition changes:

  • dependencies option in to require the presence of keywords in the same schema.
  • more strict validation of the definition using JSON Schema.
Commits

The new version differs by 14 commits.

  • cd404c4 6.9.0
  • 7079aed remove property in custom keyword definition schema
  • c89ca0e eslint option
  • 47c8fc9 refactor: use json schema to validate custom keyword definition
  • 33d1ac4 style fix
  • fdfbd44 feat: support for required dependencies of custom keyword (keywords that must be present in the same schema)
  • f080c91 docs: double quotes
  • 51e858e docs: clarify "format" option values
  • 0cf6e98 Merge branch 'mattpolzin-nullable-can-be-false'
  • ac2221a style fix
  • c5b9516 Merge branch 'master' into nullable-can-be-false
  • 58879a0 fix: pin jshint to 2.9.7 (#939)
  • 859259e Add tests that show that with nullable option on but 'nullable' keyword set to false an object is not nullable.
  • 28c85ad Allow nullable property of JSON Schema object to be false as well as true. Remove test that asserted failure if nullable was false.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ajv is breaking the build 🚨

The devDependency ajv was updated from 6.5.4 to 6.5.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 7 commits.

  • 494026e 6.5.5
  • 6478687 Merge pull request #860 from ossdev07/master
  • 2acd5f3 Merge pull request #865 from jsdevel/adding-logger-to-ts
  • d5edde4 Merge pull request #871 from nwoltman/patch-1
  • 8d769b6 Remove duplicated character in email regex
  • ae68416 Adding logger to typescript Options declaration.
  • 85b7f52 replacing phantomjs with headless chrome

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-prettier is breaking the build 🚨

The devDependency eslint-plugin-prettier was updated from 3.0.0 to 3.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 15 commits.

  • d4231c2 Build: update package.json and changelog for v3.0.1
  • 4a0e57d Catch and format SyntaxErrors as eslint violations (#141)
  • d34daed build(deps-dev): bump eslint from 5.11.0 to 5.11.1
  • 7f4f45d build(deps-dev): bump eslint from 5.10.0 to 5.11.0
  • 5be3bcf build(deps-dev): bump eslint-plugin-eslint-plugin from 2.0.0 to 2.0.1
  • 11e7c44 build(deps-dev): bump eslint from 5.9.0 to 5.10.0
  • 9e5bf14 build(deps-dev): bump eslint-plugin-eslint-plugin from 1.4.1 to 2.0.0
  • 234583a build(deps-dev): bump vue-eslint-parser from 4.0.2 to 4.0.3
  • 8675d57 build(deps-dev): bump vue-eslint-parser from 3.3.0 to 4.0.2
  • 2379e93 Upgrade: Bump vue-eslint-parser from 3.2.2 to 3.3.0
  • 3ea0021 Upgrade: Bump eslint-config-prettier from 3.1.0 to 3.3.0
  • c774fb8 Upgrade: Bump eslint from 5.8.0 to 5.9.0
  • 2a4fba0 build(deps-dev): bump eslint-plugin-node from 7.0.1 to 8.0.0 (#121)
  • 29caa29 build(deps-dev): bump eslint-plugin-eslint-plugin from 1.4.0 to 1.4.1 (#120)
  • 2836350 build(deps-dev): bump eslint from 5.6.0 to 5.8.0 (#119)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.0.2 to 6.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v6.1.0

6.1.0 / 2019-04-07

🔒 Security Fixes

  • #3845: Update dependency "js-yaml" to v3.13.0 per npm security advisory (@plroebuck)

🎉 Enhancements

  • #3766: Make reporter constructor support optional options parameter (@plroebuck)
  • #3760: Add support for config files with .jsonc extension (@sstephant)

📠 Deprecations

These are soft-deprecated, and will emit a warning upon use. Support will be removed in (likely) the next major version of Mocha:

🐛 Fixes

  • #3829: Use cwd-relative pathname to load config file (@plroebuck)
  • #3745: Fix async calls of this.skip() in "before each" hooks (@juergba)
  • #3669: Enable --allow-uncaught for uncaught exceptions thrown inside hooks (@givanse)

and some regressions:

📖 Documentation

🔩 Other

  • #3830: Replace dependency "findup-sync" with "find-up" for faster startup (@cspotcode)
  • #3799: Update devDependencies to fix many npm vulnerabilities (@XhmikosR)
Commits

The new version differs by 28 commits.

  • f4fc95a Release v6.1.0
  • bd29dbd update CHANGELOG for v6.1.0 [ci skip]
  • aaf2b72 Use cwd-relative pathname to load config file (#3829)
  • b079d24 upgrade deps as per npm audit fix; closes #3854
  • e87c689 Deprecate this.skip() for "after all" hooks (#3719)
  • 81cfa90 Copy Suite property "root" when cloning; closes #3847 (#3848)
  • 8aa2fc4 Fix issue 3714, hide pound icon showing on hover header on docs page (#3850)
  • 586bf78 Update JS-YAML to address security issue (#3845)
  • d1024a3 Update doc examples "tests.html" (#3811)
  • 1d570e0 Delete "/docs/example/chai.js"
  • ade8b90 runner.js: "self.test" undefined in Browser (#3835)
  • 0098147 Replace findup-sync with find-up for faster startup (#3830)
  • d5ba121 Remove "package" flag from sample config file because it can only be passes as CLI arg (#3793)
  • a3089ad update package-lock
  • 75430ec Upgrade yargs-parser dependency to avoid loading 2 copies of yargs

There are 28 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ajv is breaking the build 🚨

The devDependency ajv was updated from 6.9.2 to 6.10.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v6.10.0

Option strictDefaults to report ignored defaults (#957, @not-an-aardvark)
Option strictKeywords to report unknown keywords (#781)

Commits

The new version differs by 8 commits.

  • 6c20483 6.10.0
  • 38d1acd refactor: strictDefaults option
  • e993bd6 feat: strictKeywords option to report unknown keywords, closes #781
  • 9a28689 style: fix
  • 18268c5 additional tests for strictDefault options
  • 4b76519 Merge branch 'not-an-aardvark-invalidDefaults-option'
  • 88199d5 rename option to strictDefaults
  • c081061 feat: invalidDefaults option to warn when defaults are ignored, fixes #957

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

The devDependency nyc was updated from 13.2.0 to 13.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nyc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 4 commits.

  • 747a6c1 chore(release): 13.3.0
  • e8cc59b fix: update dependendencies due to vulnerabilities (#992)
  • 8a5e222 chore: Modernize lib/instrumenters. (#985)
  • dd48410 feat: Support nyc report --check-coverage (#984)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of prettier is breaking the build 🚨

The devDependency prettier was updated from 1.14.3 to 1.15.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

prettier is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for Prettier 1.15: HTML, Vue, Angular and MDX Support

🔗 Release Notes

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of sinon is breaking the build 🚨

The devDependency sinon was updated from 7.3.1 to 7.3.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

sinon is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 6 commits.

  • 15a9d65 Update docs/changelog.md and set new release id in docs/_config.yml
  • 5d770e0 Add release documentation for v7.3.2
  • 585a1e9 7.3.2
  • b51901d Update CHANGELOG.md and AUTHORS for new release
  • 83861a7 Update Lolex to bring in fix for sinonjs/lolex#232
  • 2430fd9 Documentation (#2004)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of mocha is breaking the build 🚨

The devDependency mocha was updated from 6.1.2 to 6.1.3.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 5 commits.

  • f1fe632 Release v6.1.3
  • ae3d53f update CHANGELOG for v6.1.3 [ci skip]
  • e73941a upgrade node-environment-flags; closes #3868
  • 5121211 Do not pass argv twice
  • f05a58f Fix yargs global pollution

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Error: Invalid Chai property: calledWith

Hello,

I was following your blog article, https://itnext.io/unit-testing-sequelize-models-made-easy-108f079f1e38, and was trying to set up a basic belongsTo association test. When I copy the code on the tutorial and in this readme I get the bizarre error:

1) src/models/FillUp
       associations
         defined a belongsTo association with Car:
     Error: Invalid Chai property: calledWith
      at Object.proxyGetter [as get] (node_modules/chai/lib/chai/utils/proxify.js:78:17)
      at Context.it (test/models/FillUp.spec.js:42:43)

My project and the PR with this code can be found here: https://github.com/benniemosher/fuel/pull/1

Could you please help me figure this one out?

Thanks!

Bennie

Importing makeMockModels yields error that .sequelizerc can not be found

I am importing makeMockModels as follows:

import { makeMockModels } from 'sequelize-test-helpers';

Running my Mocha test yields the following error originating from src/mockModels.js, line 11: https://gist.github.com/dschuessler/0e1c075837c4d7207151753313950d42

When I copy the exact path from the error and output it with cat /api/backend/.sequelizerc the file is present.

The error disappears when I change line 11 from:

 sequelizerc = require(path.join(projectRoot, '.sequelizerc'))

to

  sequelizerc = require.main.require('./.sequelizerc')

I am not entirely sure about the nature of the problem, but I guess it has something to do with Node having problems to require from absolute paths. I would greatly appreciate it, if you could have a closer look. Thanks in advance!

An in-range update of husky is breaking the build 🚨

The devDependency husky was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

husky is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 6 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of ajv is breaking the build 🚨

The devDependency ajv was updated from 6.5.3 to 6.5.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ajv is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 8 commits.

  • 8578816 6.5.4
  • 5c41a84 Merge pull request #863 from epoberezkin/fix-861-property-names
  • c1f929b fix: propertyNames with empty schema, closes #861
  • 70362b9 test: failing test for #861
  • 12e1655 Merge pull request #862 from billytrend/patch-2
  • f01e92a Fixes grammar
  • 851b73c Merge pull request #858 from epoberezkin/greenkeeper/bluebird-pin-3.5.1
  • 9aa65f7 fix: pin bluebird to 3.5.1

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @stryker-mutator/core is breaking the build 🚨

The devDependency @stryker-mutator/core was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/core is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 3 commits.

  • 2b55933 v1.3.1
  • 73fc0a8 fix(clean up): prevent sandbox creation after dispose (#1527)
  • 3e21a8a build(deps): update rxjs requirement from ~6.3.0 to ~6.5.1 (#1524)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lint-staged is breaking the build 🚨

The devDependency lint-staged was updated from 7.2.2 to 7.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lint-staged is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v7.3.0

7.3.0 (2018-09-20)

Features

  • Allow linting files outside of project folder (#495) (d386c80)
Commits

The new version differs by 1 commits.

  • d386c80 feat: Allow linting files outside of project folder (#495)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @stryker-mutator/core is breaking the build 🚨

The devDependency @stryker-mutator/core was updated from 1.2.0 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/core is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 26 commits.

  • f42a70f v1.3.0
  • b4336fb feat(files): use mocha 6's way of resolving files (#1512)
  • 31ee085 fix(dispose): clean up child processes in alternative flows (#1520)
  • 3c83bbe feat(onScoreCalculated): deprecate onScoreCalculated reporter event (#1513)
  • baa374d feat(mocha 6): support all config formats (#1511)
  • fd399a8 docs: specify minimum NodeJS version (#1510)
  • 70ffa61 build: use fs instead of mz in performance tests (#1507)
  • 025fe9d build(deps-dev): update nyc requirement from ^13.0.1 to ^14.0.0 (#1505)
  • b282291 Merge pull request #1504 from stryker-mutator/dependabot/npm_and_yarn/tslint-approx-5.16.0
  • 04e7e0b build(deps-dev): update tslint requirement from ~5.15.0 to ~5.16.0
  • 955dc42 Merge pull request #1496 from stryker-mutator/dependabot/npm_and_yarn/inquirer-approx-6.3.1
  • c74e98e build(deps): update inquirer requirement from ~6.2.0 to ~6.3.1
  • dd72bac Merge pull request #1495 from stryker-mutator/dependabot/npm_and_yarn/prettier-approx-1.17.0
  • b7e68d0 build(deps-dev): update webpack requirement from ~4.29.1 to ~4.30.0 (#1497)
  • 90307e7 build(deps): update istanbul-lib-instrument requirement (#1500)

There are 26 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of nyc is breaking the build 🚨

The devDependency nyc was updated from 14.0.0 to 14.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

nyc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 15 commits.

  • c5d90fa chore(release): 14.1.0
  • 5cc05f4 chore: Update dependencies
  • 1e39ae1 chore: Refresh snapshots, update test/config-override.js to use helpers (#1085)
  • 3d9eaa4 fix: Purge source-map cache before reporting if cache is disabled. (#1080)
  • 132a074 feat: Add support for env.NYC_CONFIG_OVERRIDE (#1077)
  • 6fc109f chore: node.js 12 compatibility for object snapshot test. (#1084)
  • a7bc7ae fix: Use correct config property for parser plugins (#1082)
  • 600c867 chore: Convert some tap tests to run parallel and use snapshots. (#1075)
  • 56591fa docs: instrument docs update [skip ci] (#1063)
  • ca84c42 docs(codecov): favour npx over installing locally [skip ci] (#1074)
  • 85c1eac chore: Add test for nyc --no-clean. (#1071)
  • 21fb2c8 fix: Exit with code 1 when nyc doesn't know what to do. (#1070)
  • 0f745ca chore: Use class to declare NYC (#1069)
  • ca37ffa feat: add support for yaml configuration file (#1054)
  • c4fcf5e fix: Do not crash when nyc is run inside itself. (#1068)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint is breaking the build 🚨

The devDependency eslint was updated from 5.14.0 to 5.14.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Release Notes for v5.14.1
  • 1d6e639 Fix: sort-keys throws Error at SpreadElement (fixes #11402) (#11403) (Krist Wongsuphasawat)
Commits

The new version differs by 3 commits.

  • b2e94d8 5.14.1
  • ce129ed Build: changelog update for 5.14.1
  • 1d6e639 Fix: sort-keys throws Error at SpreadElement (fixes #11402) (#11403)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-mocha is breaking the build 🚨

The devDependency eslint-plugin-mocha was updated from 5.2.1 to 5.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-mocha is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).
  • codecov/project: No report found to compare against (Details).
  • codecov/patch: Coverage not affected. (Details).

Release Notes for 5.3.0

Features

  • Implement no-async-describe rule (#188)
Commits

The new version differs by 7 commits.

  • d36c149 5.3.0
  • 4449a3d Merge pull request #188 from papandreou/feature/no-async-describe
  • 0c113b5 Simplify the fixer
  • a5fa46a Fix error message
  • 7c9b6dc Review fixes
  • d1ffa55 Fix wrong string-less describe in test cases
  • e509877 Implement no-async-describe rule

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @stryker-mutator/mocha-runner is breaking the build 🚨

The devDependency @stryker-mutator/mocha-runner was updated from 1.2.0 to 1.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/mocha-runner is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 26 commits.

  • f42a70f v1.3.0
  • b4336fb feat(files): use mocha 6's way of resolving files (#1512)
  • 31ee085 fix(dispose): clean up child processes in alternative flows (#1520)
  • 3c83bbe feat(onScoreCalculated): deprecate onScoreCalculated reporter event (#1513)
  • baa374d feat(mocha 6): support all config formats (#1511)
  • fd399a8 docs: specify minimum NodeJS version (#1510)
  • 70ffa61 build: use fs instead of mz in performance tests (#1507)
  • 025fe9d build(deps-dev): update nyc requirement from ^13.0.1 to ^14.0.0 (#1505)
  • b282291 Merge pull request #1504 from stryker-mutator/dependabot/npm_and_yarn/tslint-approx-5.16.0
  • 04e7e0b build(deps-dev): update tslint requirement from ~5.15.0 to ~5.16.0
  • 955dc42 Merge pull request #1496 from stryker-mutator/dependabot/npm_and_yarn/inquirer-approx-6.3.1
  • c74e98e build(deps): update inquirer requirement from ~6.2.0 to ~6.3.1
  • dd72bac Merge pull request #1495 from stryker-mutator/dependabot/npm_and_yarn/prettier-approx-1.17.0
  • b7e68d0 build(deps-dev): update webpack requirement from ~4.29.1 to ~4.30.0 (#1497)
  • 90307e7 build(deps): update istanbul-lib-instrument requirement (#1500)

There are 26 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

ReferenceError: context is not defined

I am trying to use the checkPropertyExists method and I am getting an error about the context not being defined.

 // Check our db model
    describe('models/Communications', function () {
        const Comm = CommunicationsModel(sequelize, dataTypes)
        const instance = new Comm()
        checkModelName(Comm)('Communications')

        context('properties', function() {
            ;['recordID', 'messageUUID', 'firstName', 'lastName', 'age', 'department', 'campus', 'state', 'partition', 'offset'].forEach(
                checkPropertyExists(instance)
            )
        })

    })

Error: ReferenceError: context is not defined

What would cause this?

An in-range update of @stryker-mutator/mocha-runner is breaking the build 🚨

The devDependency @stryker-mutator/mocha-runner was updated from 1.3.0 to 1.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

@stryker-mutator/mocha-runner is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your CircleCI tests were canceled (Details).

Commits

The new version differs by 3 commits.

  • 2b55933 v1.3.1
  • 73fc0a8 fix(clean up): prevent sandbox creation after dispose (#1527)
  • 3e21a8a build(deps): update rxjs requirement from ~6.3.0 to ~6.5.1 (#1524)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.