Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

Commit

Permalink
refactor(test): use naming presets
Browse files Browse the repository at this point in the history
  • Loading branch information
blond committed Mar 8, 2017
1 parent 99e9da3 commit 794c105
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/naming/naming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test('should support original naming', t => {
const options = {
levels: {
blocks: {
naming: { delims: { elem: '__', mod: '_' } },
naming: 'origin',
scheme: 'flat'
}
}
Expand All @@ -38,7 +38,7 @@ test('should support original naming', t => {
});
});

test('should support Convention by Harry Roberts', t => {
test('should support two-dashes naming', t => {
mockFs({
blocks: {
'block__elem--mod_val.tech': ''
Expand All @@ -48,7 +48,7 @@ test('should support Convention by Harry Roberts', t => {
const options = {
levels: {
blocks: {
naming: { delims: { elem: '__', mod: { name: '--', val: '_' } } },
naming: 'two-dashes',
scheme: 'flat'
}
}
Expand Down Expand Up @@ -102,28 +102,28 @@ test('should support custom naming', t => {

test('should support several naming', t => {
mockFs({
'original.blocks': {
'origin.blocks': {
'block_mod.tech': ''
},
'csswizardry.blocks': {
'two-dashes.blocks': {
'block--mod_val.tech': ''
}
});

const options = {
levels: {
'original.blocks': {
naming: { delims: { elem: '__', mod: '_' } },
'origin.blocks': {
naming: 'origin',
scheme: 'flat'
},
'csswizardry.blocks': {
naming: { delims: { elem: '__', mod: { name: '--', val: '_' } } },
'two-dashes.blocks': {
naming: 'two-dashes',
scheme: 'flat'
}
}
};

return toArray(walk(['original.blocks', 'csswizardry.blocks'], options))
return toArray(walk(['origin.blocks', 'two-dashes.blocks'], options))
.then(files => {
const entities = files.map(file => file.cell.entity.valueOf());

Expand Down

0 comments on commit 794c105

Please sign in to comment.