obsidian-testing-framework 0.2.0 → 0.2.2

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/lib/index.js +6 -4
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -42,9 +42,9 @@ function generateVaultConfig(vault) {
42
42
  // @ts-ignore some error about a string type now having `undefined` as part of it's union
43
43
  export const test = base.extend({
44
44
  electronApp: [
45
- async ({ obsidian }, run) => {
46
- console.log("obsidian", obsidian);
47
- const { obsidianPath = undefined, experimentalUseSingleton = false } = obsidian ?? {};
45
+ async (_idk, run) => {
46
+ const obsidianPath = inject("obsidianPath") ?? undefined;
47
+ const experimentalUseSingleton = inject("experimentalUseSingleton") ?? false;
48
48
  const vault = inject("vault");
49
49
  process.env.ELECTRON_DISABLE_SECURITY_WARNINGS = "true";
50
50
  console.log("asar located at:", getExe(obsidianPath));
@@ -61,7 +61,9 @@ export const test = base.extend({
61
61
  timeout: 60000,
62
62
  args: [getExe(obsidianPath), uriArg].filter((a) => !!a),
63
63
  });
64
- addConsoleListener(electronApp);
64
+ if (!experimentalUseSingleton) {
65
+ addConsoleListener(electronApp);
66
+ }
65
67
  await electronApp.firstWindow();
66
68
  await run(electronApp);
67
69
  if (!experimentalUseSingleton) {
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  ".": "./lib/index.js"
26
26
  },
27
27
  "readme": "",
28
- "version": "0.2.0",
28
+ "version": "0.2.2",
29
29
  "main": "./lib/index.js",
30
30
  "typings": "./lib/index.d.ts",
31
31
  "repository": {