Skip to content

Instantly share code, notes, and snippets.

@esundahl
Last active November 24, 2020 01:26
Show Gist options
  • Save esundahl/4d5ee507b17cf3a69988ccef571f0c99 to your computer and use it in GitHub Desktop.
Save esundahl/4d5ee507b17cf3a69988ccef571f0c99 to your computer and use it in GitHub Desktop.
tests.js
// This one...?
describe('Test the thing', () => {
let myThing;
beforeEach() => {
myThing = new MyThing({ hello: 'world' });
}
it('it should equal something when passed value1', () => {
// assertion2...
})
it('it should equal something else when passed value2', () => {
myThing.foo = 'bar'
// assertion2...
})
})
// Or This one...?
describe('Test the thing', () => {
it('it should equal something when passed value1', () => {
const myThing = new MyThing({ hello: 'foo' })
// assertion2...
})
it('it should equal something else when passed value2', () => {
const myThing = new MyThing({ hello: 'foo', foo: 'bar' })
// assertion2...
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment