File: test.js

package info (click to toggle)
node-ignore-by-default 1.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 96 kB
  • ctags: 1
  • sloc: makefile: 2; sh: 2
file content (20 lines) | stat: -rw-r--r-- 566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict'

var assert = require('assert')
var figures = require('figures')

var actual = require('./').directories()
var expected = actual.slice().sort()

var pass = false
try {
  assert.deepEqual(actual, expected)
  pass = true
} catch (err) {}

console[pass ? 'log' : 'error'](figures[pass ? 'tick' : 'cross'] + ' directories are sorted correctly')
if (!pass) {
  console.error('  got: ' + JSON.stringify(actual, null, 2).split('\n').join('\n  '))
  console.error('  expected: ' + JSON.stringify(expected, null, 2).split('\n').join('\n  '))
  process.exit(1)
}