metro4
Version:
The front-end framework for Build responsive, mobile-first projects on the web with the first front-end component library in Metro Style
22 lines (21 loc) • 679 B
JavaScript
import '../../../build/js/metro';
describe('Metro 4 String extension', () => {
it('toArray', () => {
const a = ['21', 'гру', '1972'];
'21-гру-1972'.toArray('-').forEach(function(el, i){
assert.equal(el, a[i]);
})
})
it('toArray formatted', () => {
const a = [21, 12, 1972];
'21-12-1972'.toArray('-', 'number').forEach(function(el, i){
assert.equal(el, a[i]);
})
})
it('toArray formatted mixed values', () => {
const a = [21, 'гру', 1972];
'21-гру-1972'.toArray('-', 'number').forEach(function(el, i){
assert.equal(el, a[i]);
})
})
});