Skip to content

Commit

Permalink
skip symlinks tests when unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkishi committed May 22, 2022
1 parent a3d336a commit 3980e3c
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { test } from 'uvu';
Expand Down Expand Up @@ -95,7 +96,13 @@ test('creates routes', () => {
]);
});

test('creates symlinked routes', () => {
const symlink_survived_git = fs
.statSync(path.join(cwd, 'samples/symlinks/routes/foo'))
.isSymbolicLink();

const test_symlinks = symlink_survived_git ? test : test.skip;

test_symlinks('creates symlinked routes', () => {
const { components, routes } = create('samples/symlinks/routes');

const index = 'samples/symlinks/routes/index.svelte';
Expand Down

0 comments on commit 3980e3c

Please sign in to comment.