Testing sorting boolean values
parent
99abda4ac1
commit
8cd5c884e0
|
@ -40,5 +40,16 @@ test('sort by age descending', () => {
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
test('sort by new descending', () => {
|
||||||
|
const result = data.sort(sortby(['new', 'desc']))
|
||||||
|
|
||||||
|
|
||||||
|
equal(result, [
|
||||||
|
{ age: 40, name: "Persone 1", new: true },
|
||||||
|
{ age: 17, name: "Persone 2", new: false },
|
||||||
|
])
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
import { runifmain, summaryreporter, errorreporter } from 'metaltest'
|
import { runifmain, summaryreporter, errorreporter } from 'metaltest'
|
||||||
await runifmain(import.meta, () => test.run(summaryreporter(), errorreporter()))
|
await runifmain(import.meta, () => test.run(summaryreporter(), errorreporter()))
|
Loading…
Reference in New Issue