cypress-ct-octane-js 0.1.32 → 0.1.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,19 +1,22 @@
1
1
  import { getContainerEl, setupHooks } from "@cypress/mount-utils";
2
2
  import { createRoot } from "octane";
3
+ let isLogEnabled = false;
3
4
  let dispose;
4
5
  function cleanup() {
5
- Cypress.log({
6
- name: "unmount",
7
- message: "Unmounted component",
8
- });
6
+ if (isLogEnabled !== false) {
7
+ Cypress.log({
8
+ name: "unmount",
9
+ message: "Unmounted component",
10
+ });
11
+ }
9
12
  dispose === null || dispose === void 0 ? void 0 : dispose();
10
13
  }
11
14
  export function mount(component, options = {}) {
15
+ isLogEnabled = options.log;
12
16
  const container = getContainerEl();
13
17
  if (!container) {
14
18
  throw new Error("'root' element not found");
15
19
  }
16
- console.log(container.innerHTML);
17
20
  const root = createRoot(container);
18
21
  dispose = root.unmount;
19
22
  root.render(component);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress-ct-octane-js",
3
- "version": "0.1.32",
3
+ "version": "0.1.33",
4
4
  "description": "Octane framework definition and mount adapter for Cypress component testing",
5
5
  "keywords": [
6
6
  "cypress",