fix(hi): Adapt to new rules about named exports
This commit is contained in:
parent
48922ad33a
commit
0bc65984cf
2 changed files with 56 additions and 11 deletions
|
@ -12,16 +12,20 @@ import draftLowerTeeth from './lowerTeeth'
|
|||
import draftUpperTeeth from './upperTeeth'
|
||||
|
||||
// Create design
|
||||
const Pattern = new freesewing.Design(config, plugins)
|
||||
const Hi = new freesewing.Design(config, plugins)
|
||||
|
||||
Pattern.prototype.draftBody = draftBody
|
||||
Pattern.prototype.draftTail = draftTail
|
||||
Pattern.prototype.draftMouth = draftMouth
|
||||
Pattern.prototype.draftAboveMouth = draftAboveMouth
|
||||
Pattern.prototype.draftBelly = draftBelly
|
||||
Pattern.prototype.draftTopFin = draftTopFin
|
||||
Pattern.prototype.draftBottomFin = draftBottomFin
|
||||
Pattern.prototype.draftLowerTeeth = draftLowerTeeth
|
||||
Pattern.prototype.draftUpperTeeth = draftUpperTeeth
|
||||
Hi.prototype.draftBody = draftBody
|
||||
Hi.prototype.draftTail = draftTail
|
||||
Hi.prototype.draftMouth = draftMouth
|
||||
Hi.prototype.draftAboveMouth = draftAboveMouth
|
||||
Hi.prototype.draftBelly = draftBelly
|
||||
Hi.prototype.draftTopFin = draftTopFin
|
||||
Hi.prototype.draftBottomFin = draftBottomFin
|
||||
Hi.prototype.draftLowerTeeth = draftLowerTeeth
|
||||
Hi.prototype.draftUpperTeeth = draftUpperTeeth
|
||||
|
||||
export default Pattern
|
||||
// Named exports
|
||||
export { config, Hi }
|
||||
|
||||
// Default export
|
||||
export default Hi
|
||||
|
|
41
packages/hi/tests/shared.test.mjs
Normal file
41
packages/hi/tests/shared.test.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
// This file is auto-generated.
|
||||
// Changes you make will be overwritten.
|
||||
import chai from 'chai'
|
||||
import models from '@freesewing/models'
|
||||
import patterns from '@freesewing/pattern-info'
|
||||
import Hi from './dist/index.mjs'
|
||||
|
||||
// Shared tests
|
||||
import { testPatternConfig } from '../../../tests/patterns/config.mjs'
|
||||
import { testPatternDrafting } from '../../../tests/patterns/drafting.mjs'
|
||||
import { testPatternSampling } from '../../../tests/patterns/sampling.mjs'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
||||
// Test config
|
||||
testPatternConfig(
|
||||
'hi',
|
||||
new Hi(),
|
||||
expect,
|
||||
models,
|
||||
patterns
|
||||
)
|
||||
|
||||
// Test drafting
|
||||
testPatternDrafting(
|
||||
'hi',
|
||||
Hi,
|
||||
expect,
|
||||
models,
|
||||
patterns
|
||||
)
|
||||
|
||||
// Test sampling
|
||||
testPatternSampling(
|
||||
'hi',
|
||||
Hi,
|
||||
expect,
|
||||
models,
|
||||
patterns
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue