智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/f0/f03b0189bddb3b47dc7df2b6559...

34 lines
623 B

'use strict';
const assert = require('assert');
const unit = require('../util/unit');
describe('unit', function () {
it('unit', function () {
assert.deepEqual(unit('.23rem'), {
number: '.23',
unit: 'rem',
});
assert.deepEqual(unit('.2.3rem'), {
number: '.2',
unit: '.3rem',
});
assert.deepEqual(unit('2.'), {
number: '2.',
unit: '',
});
assert.deepEqual(unit('+2.'), {
number: '+2.',
unit: '',
});
assert.deepEqual(unit('+-2.'), false);
assert.deepEqual(unit('.'), false);
assert.deepEqual(unit('.rem'), false);
});
});