@devitek/mailsink-playwright 0.2.0 → 0.3.0

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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  worker gets its own ephemeral workspace, every test waits for the emails your application
6
6
  sends, opens their links in the page, reads their one-time codes and forces bounces.
7
7
 
8
- - Built on the TypeScript SDK [`@devitek/mailsink`](../sdk/README.md): the `mailsink`
8
+ - Built on the TypeScript SDK [`@devitek/mailsink`](https://mailsink.devitek.fr/guides/sdk/): the `mailsink`
9
9
  fixture is an SDK client.
10
10
  - One ephemeral workspace per worker, created through the Admin API, reset before each test,
11
11
  deleted when the worker ends, with an idle TTL as safety net for killed runs.
@@ -140,6 +140,11 @@ test.describe('a failing provider', () => {
140
140
  `withOverride(config, fn)` only lasts for `fn`. Before each test, every override of the
141
141
  workspace is reset anyway.
142
142
 
143
+ ## Documentation
144
+
145
+ The [end-to-end testing guide](https://mailsink.devitek.fr/guides/e2e/) of the
146
+ [Mailsink documentation](https://mailsink.devitek.fr) walks through a complete suite.
147
+
143
148
  ## License
144
149
 
145
150
  MIT
package/dist/index.d.ts CHANGED
@@ -112,7 +112,10 @@ interface MailsinkWorkspace {
112
112
  }
113
113
  /** The test-scoped `mailsink` fixture: the SDK client of the worker's workspace, plus helpers. */
114
114
  interface MailsinkTestClient extends Mailsink$1 {
115
- /** Start of the test: `expectEmail` only sees emails received from then on. */
115
+ /**
116
+ * Start of the test on the server clock (`now()`): `expectEmail` only sees emails
117
+ * received from then on.
118
+ */
116
119
  since: Date;
117
120
  /** The worker's workspace: ids, connections, `.env` of the application under test. */
118
121
  workspace: MailsinkWorkspace;
package/dist/index.js CHANGED
@@ -292,7 +292,7 @@ const test = test$1.extend({
292
292
  mailsinkOverride: [null, { option: true }],
293
293
  mailsink: [async ({ mailsinkWorkspace, mailsinkReset, mailsinkOverride }, use) => {
294
294
  await resetWorkspace(mailsinkWorkspace.client, mailsinkReset);
295
- const session = createTestSession(mailsinkWorkspace, /* @__PURE__ */ new Date());
295
+ const session = createTestSession(mailsinkWorkspace, mailsinkWorkspace.client.now());
296
296
  const { client } = session;
297
297
  const expectEmail = client.expectEmail;
298
298
  client.expectEmail = (filters, options) => test$1.step(`expectEmail ${JSON.stringify(filters ?? {})}`, () => expectEmail(filters, options), { box: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devitek/mailsink-playwright",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Playwright fixtures and matchers for Mailsink: one ephemeral workspace per worker, expectEmail, links, one-time codes and overrides",
5
5
  "keywords": [
6
6
  "mailsink",
@@ -40,7 +40,7 @@
40
40
  "access": "public"
41
41
  },
42
42
  "dependencies": {
43
- "@devitek/mailsink": "0.2.0"
43
+ "@devitek/mailsink": "0.3.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@playwright/test": ">=1.47.0"