Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ReferenceError: fixture is not defined
- at <Jasmine>
- at UserContext.<anonymous> (test/my-component.test-without-openwc.js:19:16)
- at <Jasmine>
- const templateString = `<div id="mydiv" name="mydiv"><p>Hello world 2!</p></div>`;
- const template = document.createElement("template");
- template.innerHTML = templateString;
- export class MyComponent extends HTMLElement {
- constructor() {
- super();
- const shadowRoot = this.attachShadow({ mode: "open" });
- shadowRoot.appendChild(template.content.cloneNode(true));
- }
- }
- customElements.define("my-component", MyComponent);
- module.exports = function(config) {
- config.set({
- basePath: "",
- frameworks: ["fixture","jasmine"],
- files: [
- "node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js",
- {
- pattern: "**/*.test-without-openwc.js",
- type: "module",
- included: true
- },
- { pattern: "**/*.js", type: "module", included: false }
- ],
- exclude: [],
- preprocessors: {},
- reporters: ["spec"],
- port: 9876,
- colors: true,
- logLevel: config.LOG_INFO,
- autoWatch: true,
- browsers: ["Chrome"],
- singleRun: true,
- concurrency: Infinity
- });
- };
- it("second try (using fixture)", async () => {
- //const el = await fixture("<my-component></my-component>");
- const el = await fixture.load("<my-component></my-component>");
- expect(el.success).to.be.false;
- //expect(el.querySelector("mydiv")).toBeTruthy();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement