Skip to content

Instantly share code, notes, and snippets.

@NickHeiner
Last active August 29, 2015 14:18
Show Gist options
  • Save NickHeiner/9bb58318d026fcc59135 to your computer and use it in GitHub Desktop.
Save NickHeiner/9bb58318d026fcc59135 to your computer and use it in GitHub Desktop.
const writtenManifest = readJson('test-dir/manifest.json');
// bad
expect(manifest).to.deep.equal({
// One giant hardcoded object, including fields we are about...
foo: 'bar',
odp: 'quux',
// ...and fields we don't
superfluousField: 'We do not really care about this field '
+ 'but we are still asserting on it'
});
// good
expect(manifest).to.have.property('foo', 'bar');
expect(manifest).to.have.property('odp', 'quux');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment