obsidian-testing-framework 0.1.3 → 0.1.5

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.
package/lib/index.js CHANGED
@@ -84,7 +84,7 @@ export const test = base.extend({
84
84
  electronApp.on("console", async (msg) => {
85
85
  console.log(...(await Promise.all(msg.args().map((a) => a.jsonValue()))));
86
86
  });
87
- await electronApp.waitForEvent("window");
87
+ await electronApp.firstWindow();
88
88
  await run(electronApp);
89
89
  await electronApp.close();
90
90
  }, { auto: true }
package/lib/util.d.ts CHANGED
@@ -36,7 +36,7 @@ export declare function assertLineEquals(page: Page, path: string, lineNumber: n
36
36
  */
37
37
  export declare function assertLinesEqual(page: Page, path: string, start: number, end: number, expected: string, cached?: boolean): Promise<void>;
38
38
  /**
39
- * asserts all lines in the given range match a regex.
39
+ * asserts that lines in the given range match a regex.
40
40
  *
41
41
  * @export
42
42
  * @param {Page} page - a Playwright page
package/lib/util.js CHANGED
@@ -53,7 +53,7 @@ const getFile = (file) => {
53
53
  return f;
54
54
  };
55
55
  /**
56
- * asserts all lines in the given range match a regex.
56
+ * asserts that lines in the given range match a regex.
57
57
  *
58
58
  * @export
59
59
  * @param {Page} page - a Playwright page
@@ -66,7 +66,7 @@ const getFile = (file) => {
66
66
  export async function assertLinesMatch(page, path, start, end, regex, cached = true) {
67
67
  const fileContent = await readFile(page, path, cached);
68
68
  const lines = fileContent.split("\n").slice(start, end);
69
- expect(lines.every(l => regex.test(l))).toEqual(true);
69
+ expect(lines.some(l => regex.test(l))).toEqual(true);
70
70
  }
71
71
  /**
72
72
  * reads the file at `path` and returns its contents
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "../../README.md"
20
20
  ],
21
21
  "readme": "",
22
- "version": "0.1.3",
22
+ "version": "0.1.5",
23
23
  "main": "./lib/index.js",
24
24
  "typings": "./lib/index.d.ts",
25
25
  "scripts": {