Skip to content

Commit

Permalink
Move function declaration to function body root.
Browse files Browse the repository at this point in the history
  • Loading branch information
kern committed Mar 8, 2016
1 parent 8374535 commit b1ba64f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ describe('invar.fail', () => {

describe('invar.req', () => {
it('throws a generic error when no argument name is provided', () => {
function fn (daisy = invar.req()) {}
try {
function fn (daisy = invar.req()) {}
fn()
expect(false).toBeTruthy()
} catch (ex) {
Expand All @@ -44,8 +44,8 @@ describe('invar.req', () => {
})

it('throws a specific error when an argument name is provided', () => {
function fn (daisy = invar.req('daisy')) {}
try {
function fn (daisy = invar.req('daisy')) {}
fn()
expect(false).toBeTruthy()
} catch (ex) {
Expand Down

0 comments on commit b1ba64f

Please sign in to comment.