chore: Improve unit test
This commit is contained in:
parent
01cfae50af
commit
7feb605842
1 changed files with 6 additions and 6 deletions
|
@ -1,13 +1,13 @@
|
|||
import freesewing from "@freesewing/core";
|
||||
import { version } from "../package.json";
|
||||
let chai = require("chai");
|
||||
let expect = chai.expect;
|
||||
chai.use(require('chai-string'));
|
||||
let plugin = require("../dist/index.js");
|
||||
|
||||
const chai = require("chai");
|
||||
const expect = chai.expect;
|
||||
const plugin = require("../dist/index.js");
|
||||
|
||||
it("Should set the plugin name:version attribute", () => {
|
||||
let pattern = new freesewing.Pattern();
|
||||
pattern.use(plugin).draft().render();
|
||||
const pattern = new freesewing.Pattern().use(plugin)
|
||||
pattern.draft().render();
|
||||
expect(pattern.svg.attributes.get("freesewing:plugin-buttons")).to.equal(
|
||||
version
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue