1
0
Fork 0

chore(plugin-title): Ported to v3

This commit is contained in:
Joost De Cock 2022-08-28 14:06:01 +02:00
parent 7b3b26da41
commit 5ce24d49a1
5 changed files with 22 additions and 22 deletions

View file

@ -1,15 +1,15 @@
import chai from 'chai'
import freesewing from '@freesewing/core'
import plugin from '../dist/index.mjs'
import { Pattern } from '@freesewing/core'
import { plugin } from './dist/index.mjs'
const expect = chai.expect
describe('Title Plugin Tests', () => {
const pattern = new freesewing.Pattern().use(plugin)
const pattern = new Pattern().use(plugin)
pattern.draft().render()
it("Should run the title macro", () => {
let pattern = new freesewing.Pattern({ name: "testPattern", version: 99 });
let pattern = new Pattern({ name: "testPattern", version: 99 });
pattern.draft = function() {};
pattern.use(plugin);
pattern.parts.test = new pattern.Part();
@ -45,7 +45,7 @@ describe('Title Plugin Tests', () => {
});
it("Should run the title macro with append flag", () => {
let pattern = new freesewing.Pattern({ name: "testPattern", version: 99 });
let pattern = new Pattern({ name: "testPattern", version: 99 });
pattern.draft = function() {};
pattern.use(plugin);
pattern.parts.test = new pattern.Part();
@ -73,7 +73,7 @@ describe('Title Plugin Tests', () => {
});
it("Should run the title macro with point prefix", () => {
let pattern = new freesewing.Pattern({ name: "testPattern", version: 99 });
let pattern = new Pattern({ name: "testPattern", version: 99 });
pattern.draft = function() {};
pattern.use(plugin);
pattern.parts.test = new pattern.Part();