@rvoh/psychic-spec-helpers 0.3.0 → 0.3.1-fgbeta-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.
@@ -3,7 +3,7 @@ export default async function launchBrowser(opts) {
3
3
  return await puppeteer.launch({
4
4
  browser: 'firefox',
5
5
  dumpio: process.env.DEBUG === '1',
6
- headless: true,
6
+ headless: process.env.HEADLESS !== '0',
7
7
  ...opts,
8
8
  });
9
9
  }
@@ -1,5 +1,6 @@
1
1
  import { ExpectToEvaluateOpts } from './feature/internal/evaluateWithRetryAndTimeout.js';
2
2
  import { CustomMatcherResult } from './feature/helpers/providePuppeteerViteMatchers.js';
3
+ import { Page } from 'puppeteer';
3
4
  export { default as specRequest } from './unit/SpecRequest.js';
4
5
  export { default as createPsychicServer } from './unit/createPsychicServer.js';
5
6
  export { SpecRequest } from './unit/SpecRequest.js';
@@ -11,6 +12,7 @@ export { default as launchViteServer, stopViteServer } from './feature/helpers/l
11
12
  export { default as visit } from './feature/helpers/visit.js';
12
13
  declare global {
13
14
  function context(description: string, callback: () => void): void;
15
+ const page: InstanceType<typeof Page>;
14
16
  }
15
17
  declare module 'vitest' {
16
18
  interface ExpectStatic extends PuppeteerAssertions {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@rvoh/psychic-spec-helpers",
4
- "version": "0.3.0",
4
+ "version": "0.3.1-fgbeta-2",
5
5
  "description": "psychic framework spec helpers",
6
6
  "main": "./dist/cjs/src/index.js",
7
7
  "module": "./dist/esm/src/index.js",
@@ -4,7 +4,7 @@ export default async function launchBrowser(opts?: LaunchOptions) {
4
4
  return await puppeteer.launch({
5
5
  browser: 'firefox',
6
6
  dumpio: process.env.DEBUG === '1',
7
- headless: true,
7
+ headless: process.env.HEADLESS !== '0',
8
8
  ...opts,
9
9
  })
10
10
  }
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ExpectToEvaluateOpts } from './feature/internal/evaluateWithRetryAndTimeout.js'
2
2
  import { CustomMatcherResult } from './feature/helpers/providePuppeteerViteMatchers.js'
3
+ import { Page } from 'puppeteer'
3
4
 
4
5
  // unit spec helpers
5
6
  export { default as specRequest } from './unit/SpecRequest.js'
@@ -16,6 +17,7 @@ export { default as visit } from './feature/helpers/visit.js'
16
17
 
17
18
  declare global {
18
19
  function context(description: string, callback: () => void): void
20
+ const page: InstanceType<typeof Page>
19
21
  }
20
22
 
21
23
  declare module 'vitest' {