| 269 | const server = await createServerWithPlugin({ |
| 270 | name: class="st">'test', |
| 271 | hotUpdate() { |
| 272 | if (this.environment.name !== class="st">'client') return |
| 273 | |
| 274 | expect(this).toMatchObject({ |
| 275 | debug: expect.any(Function), |
| 276 | info: expect.any(Function), |
| 277 | warn: expect.any(Function), |
| 278 | error: expect.any(Function), |
| 279 | meta: expect.any(Object), |
| 280 | environment: expect.any(Object), |
| 281 | }) |
| 282 | expect(this.meta.rollupVersion).toBeTypeOf(class="st">'string') |
| 283 | expect(this.meta.viteVersion).toBeTypeOf(class="st">'string') |
| 284 | expect(this.meta.watchMode).toBe(true) |
| 285 | resolve() |
| 286 | }, |
| 287 | }) |
| 288 | server.watcher.emit( |
| 289 | class="st">'change', |