chore(models): Ported to v3
This commit is contained in:
parent
1bcdce2223
commit
1de3e428c1
16 changed files with 282 additions and 359 deletions
26
packages/models/tests/models.test.mjs
Normal file
26
packages/models/tests/models.test.mjs
Normal file
|
@ -0,0 +1,26 @@
|
|||
import chai from "chai"
|
||||
import * as all from "./dist/index.mjs"
|
||||
|
||||
const expect = chai.expect
|
||||
const { measurements, sizes } = all
|
||||
|
||||
describe('Measurements', () => {
|
||||
it("Measurements should be a named export and match the sizes", () => {
|
||||
for (const m of measurements) {
|
||||
expect(typeof all.womenswear28[m]).to.equal('number');
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
for (const type in sizes) {
|
||||
describe(`Sizes: ${type}`, () => {
|
||||
for (const size of sizes[type]) {
|
||||
it(`${type}${size} should have all measurements`, () => {
|
||||
for (const m of measurements) {
|
||||
expect(typeof all[`${type}${size}`][m]).to.equal('number');
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue