no-output.test.js 582 B

12345678910111213141516171819202122232425
  1. import { loadFixture } from './test-utils.js';
  2. import assert from 'node:assert/strict';
  3. import { before, describe, it } from 'node:test';
  4. describe('Missing output config', () => {
  5. /** @type {import('./test-utils').Fixture} */
  6. let fixture;
  7. before(async () => {
  8. fixture = await loadFixture({
  9. root: './fixtures/no-output/',
  10. });
  11. });
  12. it('throws during the build', async () => {
  13. let error = undefined;
  14. try {
  15. await fixture.build();
  16. } catch (err) {
  17. error = err;
  18. }
  19. assert.notEqual(error, undefined);
  20. assert.match(error.message, /output: "server"/);
  21. });
  22. });