✅ Updated tests for hooks workaround
This commit is contained in:
parent
a0a316b60e
commit
933b1b5a3d
1 changed files with 5 additions and 5 deletions
|
@ -170,15 +170,15 @@ it("Should sample models with focus", () => {
|
||||||
expect(pattern.parts.a.paths.test_1.attributes.get("class")).to.equal(
|
expect(pattern.parts.a.paths.test_1.attributes.get("class")).to.equal(
|
||||||
"sample-focus"
|
"sample-focus"
|
||||||
);
|
);
|
||||||
expect(
|
expect(pattern.parts.b.paths.test_2.attributes.get("style")).to.equal(
|
||||||
pattern.parts.b.paths.test_2.attributes.get("style")
|
"stroke: hsl(165, 100%, 35%);"
|
||||||
).to.equalIgnoreSpaces("stroke: hsl(165, 100%, 35%);");
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should register a hook via on", () => {
|
it("Should register a hook via on", () => {
|
||||||
let pattern = new freesewing.Pattern();
|
let pattern = new freesewing.Pattern();
|
||||||
let count = 0;
|
let count = 0;
|
||||||
pattern.draft = () => {};
|
pattern._draft = () => {};
|
||||||
pattern.on("preDraft", function(next) {
|
pattern.on("preDraft", function(next) {
|
||||||
count++;
|
count++;
|
||||||
next();
|
next();
|
||||||
|
@ -190,7 +190,7 @@ it("Should register a hook via on", () => {
|
||||||
it("Should register a hook from a plugin", () => {
|
it("Should register a hook from a plugin", () => {
|
||||||
let pattern = new freesewing.Pattern();
|
let pattern = new freesewing.Pattern();
|
||||||
let count = 0;
|
let count = 0;
|
||||||
pattern.draft = () => {};
|
pattern._draft = () => {};
|
||||||
let plugin = {
|
let plugin = {
|
||||||
name: "test",
|
name: "test",
|
||||||
version: "0.1-test",
|
version: "0.1-test",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue