Skip to content

Commit

Permalink
Improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Mar 22, 2019
1 parent 0e1c49d commit 474f019
Show file tree
Hide file tree
Showing 5 changed files with 486 additions and 4 deletions.
6 changes: 5 additions & 1 deletion docs/API.md
Expand Up @@ -71,7 +71,11 @@ console.log(normalize('d--- --- ---')) // '---------'
console.log(normalize({ user: { read: undefined, write: true } }))
// { user: { write: true } }

console.log(normalize('z+x')) // Throws an exception
try {
console.log(normalize('z+x')) // Throws an exception
} catch (error) {
console.log(error.message)
}
```

## positive(permission)
Expand Down
6 changes: 5 additions & 1 deletion examples/methods/normalize.js
Expand Up @@ -22,4 +22,8 @@ console.log(normalize('d--- --- ---')) // '---------'
console.log(normalize({ user: { read: undefined, write: true } }))
// { user: { write: true } }

console.log(normalize('z+x')) // Throws an exception
try {
console.log(normalize('z+x')) // Throws an exception
} catch (error) {
console.log(error.message)
}
4 changes: 2 additions & 2 deletions test/examples.js
Expand Up @@ -49,9 +49,9 @@ const getTestData = function({ filename, dir }) {
return
}

const name = getTestName({ filename })

const path = normalize(`${dir}/${filename}`)

const name = getTestName({ command, path })
const run = runCommand.bind(null, { command, path })
return { name, run }
}
Expand Down

0 comments on commit 474f019

Please sign in to comment.