-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
40 lines (35 loc) · 1.09 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
require('mocha');
var isWindows = require('is-windows');
var assert = require('assert');
var green = require('ansi-green');
var gray = require('ansi-gray');
var radio = require('./');
describe('radio-symbol', function() {
it('should export an object', function() {
assert(radio);
assert.equal(typeof radio, 'object');
});
it('should export radio symbols', function() {
if (isWindows()) {
assert.equal(radio.on, green('(*)'));
assert.equal(radio.off, '( )');
assert.equal(radio.disabled, gray('(|)'));
} else {
assert.equal(radio.on, green('◉'));
assert.equal(radio.off, '◯');
assert.equal(radio.disabled, gray('Ⓘ'));
}
});
it('should export check symbols', function() {
if (isWindows()) {
assert.equal(radio.check.on, green('\u221A'));
assert.equal(radio.check.off, '[ ]');
assert.equal(radio.check.disabled, gray('\u00D7'));
} else {
assert.equal(radio.check.on, green('✓'));
assert.equal(radio.check.off, '☐');
assert.equal(radio.check.disabled, gray('☒'));
}
});
});