summaryrefslogtreecommitdiff
path: root/packages/astro/test/custom-assets-name.test.js
blob: 63cd3eb171f2d73e898c752dc0e6bc21da6d4a14 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js';

describe('custom the assets name function', () => {
	/** @type {import('./test-utils').Fixture} */
	let fixture;

	before(async () => {
		fixture = await loadFixture({
			root: './fixtures/custom-assets-name/',
			output: 'server',
		});
		await fixture.build();
	});

	it('It cant find this file cause the node throws an error if the users custom a path that includes the folder path', async () => {
		const csslength = await fixture.readFile('client/assets/css/a.css');
		/** @type {Set<string>} */
		assert.equal(!!csslength, true);
	});
});