-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
615c19b
commit 478af18
Showing
8 changed files
with
339 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,88 @@ | ||
// import { expect } from 'chai'; | ||
import { expect } from 'chai'; | ||
|
||
// import { parse } from 'css'; | ||
import { parse } from 'css'; | ||
|
||
// import { toObject } from './../src/objectify'; | ||
import { toObject } from './../src/objectify'; | ||
|
||
// describe('toObject(stylesheet)', function() { | ||
// describe('objectifies class selectors', () => { | ||
// it('one class', () => { | ||
// const expected = { | ||
// '.class' : { | ||
// 'border': '1px solid black' | ||
// } | ||
// }; | ||
describe('toObject(stylesheet)', function() { | ||
describe('objectifies class selectors', () => { | ||
it('one class', () => { | ||
const expected = { | ||
'.class' : { | ||
'border': '1px solid black' | ||
} | ||
}; | ||
|
||
// const actual = toObject(parse(`.class { border: 1px solid black; }`).stylesheet); | ||
const actual = toObject(parse(`.class { border: 1px solid black; }`).stylesheet); | ||
|
||
// expect(actual).to.deep.equal(expected); | ||
// }); | ||
expect(actual).to.deep.equal(expected); | ||
}); | ||
|
||
// it('two classes', () => { | ||
// const expected = { | ||
// '.class' : { | ||
// 'border': '1px solid black' | ||
// }, | ||
it('two classes', () => { | ||
const expected = { | ||
'.class' : { | ||
'border': '1px solid black' | ||
}, | ||
|
||
// '.class2' : { | ||
// 'background-color': '#2233FF' | ||
// } | ||
// }; | ||
'.class2' : { | ||
'background-color': '#2233FF' | ||
} | ||
}; | ||
|
||
// const actual = toObject(parse( | ||
// `.class { | ||
// border: 1px solid black; | ||
// } | ||
const actual = toObject(parse( | ||
`.class { | ||
border: 1px solid black; | ||
} | ||
// .class2 { | ||
// background-color: #2233FF; | ||
// }` | ||
// ).stylesheet); | ||
.class2 { | ||
background-color: #2233FF; | ||
}` | ||
).stylesheet); | ||
|
||
// expect(actual).to.deep.equal(expected); | ||
// }); | ||
expect(actual).to.deep.equal(expected); | ||
}); | ||
|
||
// it('re-accuring class', () => { | ||
// const expected = { | ||
// '.class' : { | ||
// 'border': '1px solid black', | ||
// 'background-color': '#2233FF' | ||
// } | ||
// }; | ||
it('re-accuring class', () => { | ||
const expected = { | ||
'.class' : { | ||
'border': '1px solid black', | ||
'background-color': '#2233FF' | ||
} | ||
}; | ||
|
||
// const actual = toObject(parse( | ||
// `.class { | ||
// border: 1px solid black; | ||
// } | ||
const actual = toObject(parse( | ||
`.class { | ||
border: 1px solid black; | ||
} | ||
// .class { | ||
// background-color: #2233FF; | ||
// }` | ||
// ).stylesheet); | ||
.class { | ||
background-color: #2233FF; | ||
}` | ||
).stylesheet); | ||
|
||
// expect(actual).to.deep.equal(expected); | ||
// }); | ||
expect(actual).to.deep.equal(expected); | ||
}); | ||
|
||
// it('re-accuring class with conflicting (overriding) styles', () => { | ||
// const expected = { | ||
// '.class' : { | ||
// 'border': '1px solid black', | ||
// 'background-color': 'white' | ||
// } | ||
// }; | ||
it('re-accuring class with conflicting (overriding) styles', () => { | ||
const expected = { | ||
'.class' : { | ||
'border': '1px solid black', | ||
'background-color': 'white' | ||
} | ||
}; | ||
|
||
// const actual = toObject(parse( | ||
// `.class { | ||
// border: 1px solid black; | ||
// background-color: #2233FF; | ||
// } | ||
const actual = toObject(parse( | ||
`.class { | ||
border: 1px solid black; | ||
background-color: #2233FF; | ||
} | ||
// .class { | ||
// background-color: white; | ||
// }` | ||
// ).stylesheet); | ||
.class { | ||
background-color: white; | ||
}` | ||
).stylesheet); | ||
|
||
// expect(actual).to.deep.equal(expected); | ||
// }); | ||
// }); | ||
// }); | ||
expect(actual).to.deep.equal(expected); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.