Skip to content

Commit

Permalink
test(lib/string): Refactor test
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Nov 30, 2017
1 parent aab6d11 commit 5226a11
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib/string.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ test('testing string with last_name', (t) => {
first_name: faker.name.firstName(),
last_name: faker.name.lastName(),
}
const name = makeName(user)

t.true(/[a-z]/ig.test(name))
t.is(makeName(user), `${user.first_name} ${user.last_name}`)
})

test('testing string without last_name', (t) => {
const user = {
first_name: faker.name.firstName(),
}
const name = makeName(user)

t.true(/[a-z]/ig.test(name))
t.is(makeName(user), `${user.first_name}`)
})

0 comments on commit 5226a11

Please sign in to comment.