Skip to content

Commit

Permalink
test: add more true cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Sep 26, 2021
1 parent 6bfa96f commit ddf53d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ module.exports = (platform = '') => {
platform = platform.toLowerCase()
return (
[
'linux',
'aix',
'android',
'darwin',
'freebsd',
'sunos',
'aix',
'linux',
'openbsd',
'android'
'sunos'
].indexOf(platform) !== -1
)
}
8 changes: 5 additions & 3 deletions test/true.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ const test = require('ava')

const isUNIX = require('..')

;['linux', 'darwin', 'freebsd', 'sunos'].forEach(input => {
test(input, t => t.true(isUNIX(input)))
})
;['aix', 'android', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos'].forEach(
input => {
test(input, t => t.true(isUNIX(input)))
}
)

0 comments on commit ddf53d6

Please sign in to comment.