Skip to content

Commit

Permalink
test: fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Dec 7, 2024
1 parent e609a8b commit b6e9a50
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions packages/brisa/src/cli/serve/deno-serve/handler.deno-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { assertEquals, assert } from 'jsr:@std/assert';
import { join } from 'node:path';
import { resolve } from 'node:path';

const FIXTURES_DIR = path.resolve(
const FIXTURES_DIR = resolve(
import.meta.dirname,
'..',
'..',
Expand All @@ -16,10 +16,10 @@ Deno.test('should resolve a page', async () => {
globalThis.mockConstants = {
IS_SERVE_PROCESS: true,
ROOT_DIR: FIXTURES_DIR,
SRC_DIR: join(FIXTURES_DIR, 'js'),
BUILD_DIR: join(FIXTURES_DIR, 'js'),
ASSETS_DIR: join(FIXTURES_DIR, 'public'),
PAGES_DIR: join(FIXTURES_DIR, 'js', 'pages'),
SRC_DIR: resolve(FIXTURES_DIR, 'js'),
BUILD_DIR: resolve(FIXTURES_DIR, 'js'),
ASSETS_DIR: resolve(FIXTURES_DIR, 'public'),
PAGES_DIR: resolve(FIXTURES_DIR, 'js', 'pages'),
CONFIG: {},
HEADERS: {
CACHE_CONTROL: 'no-cache, no-store, must-revalidate',
Expand All @@ -43,10 +43,10 @@ Deno.test('should redirect to the locale', async () => {
globalThis.mockConstants = {
IS_SERVE_PROCESS: true,
ROOT_DIR: FIXTURES_DIR,
SRC_DIR: join(FIXTURES_DIR, 'js'),
BUILD_DIR: join(FIXTURES_DIR, 'js'),
ASSETS_DIR: join(FIXTURES_DIR, 'public'),
PAGES_DIR: join(FIXTURES_DIR, 'js', 'pages'),
SRC_DIR: resolve(FIXTURES_DIR, 'js'),
BUILD_DIR: resolve(FIXTURES_DIR, 'js'),
ASSETS_DIR: resolve(FIXTURES_DIR, 'public'),
PAGES_DIR: resolve(FIXTURES_DIR, 'js', 'pages'),
I18N_CONFIG: {
locales: ['en', 'es'],
defaultLocale: 'es',
Expand All @@ -71,10 +71,10 @@ Deno.test('should redirect to trailingSlash', async () => {
globalThis.mockConstants = {
IS_SERVE_PROCESS: true,
ROOT_DIR: FIXTURES_DIR,
SRC_DIR: join(FIXTURES_DIR, 'js'),
BUILD_DIR: join(FIXTURES_DIR, 'js'),
ASSETS_DIR: join(FIXTURES_DIR, 'public'),
PAGES_DIR: join(FIXTURES_DIR, 'js', 'pages'),
SRC_DIR: resolve(FIXTURES_DIR, 'js'),
BUILD_DIR: resolve(FIXTURES_DIR, 'js'),
ASSETS_DIR: resolve(FIXTURES_DIR, 'public'),
PAGES_DIR: resolve(FIXTURES_DIR, 'js', 'pages'),
CONFIG: {
trailingSlash: true,
},
Expand All @@ -96,10 +96,10 @@ Deno.test('should redirect locale and trailing slash', async () => {
globalThis.mockConstants = {
IS_SERVE_PROCESS: true,
ROOT_DIR: FIXTURES_DIR,
SRC_DIR: join(FIXTURES_DIR, 'js'),
BUILD_DIR: join(FIXTURES_DIR, 'js'),
ASSETS_DIR: join(FIXTURES_DIR, 'public'),
PAGES_DIR: join(FIXTURES_DIR, 'js', 'pages'),
SRC_DIR: resolve(FIXTURES_DIR, 'js'),
BUILD_DIR: resolve(FIXTURES_DIR, 'js'),
ASSETS_DIR: resolve(FIXTURES_DIR, 'public'),
PAGES_DIR: resolve(FIXTURES_DIR, 'js', 'pages'),
I18N_CONFIG: {
locales: ['en', 'es'],
defaultLocale: 'es',
Expand All @@ -126,10 +126,10 @@ Deno.test('should return 404 if the asset does not exist', async () => {
globalThis.mockConstants = {
IS_SERVE_PROCESS: true,
ROOT_DIR: FIXTURES_DIR,
SRC_DIR: join(FIXTURES_DIR, 'js'),
BUILD_DIR: join(FIXTURES_DIR, 'js'),
ASSETS_DIR: join(FIXTURES_DIR, 'public'),
PAGES_DIR: join(FIXTURES_DIR, 'js', 'pages'),
SRC_DIR: resolve(FIXTURES_DIR, 'js'),
BUILD_DIR: resolve(FIXTURES_DIR, 'js'),
ASSETS_DIR: resolve(FIXTURES_DIR, 'public'),
PAGES_DIR: resolve(FIXTURES_DIR, 'js', 'pages'),
CONFIG: {},
HEADERS: {
CACHE_CONTROL: 'no-cache, no-store, must-revalidate',
Expand Down

0 comments on commit b6e9a50

Please sign in to comment.