Skip to content

Commit

Permalink
chore: normalise fixture paths for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
carbontwelve committed May 1, 2024
1 parent bad3660 commit ef1eb07
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/eleventy.test.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
const test = require("ava");
const Eleventy = require("@11ty/eleventy");
const {normalize} = require('./helpers');
const path = require("path");
const path = require('node:path');

function findResultByUrl(results, url) {
const [result] = results.filter(result => result.url === url);
return result;
}

const fixturePath = (p) => path.normalize(path.join(__dirname, 'fixtures', p));

test("Sample page (wikilinks and regular links)", async t => {
let elev = new Eleventy(path.join(__dirname, '/fixtures/sample-small-website'), path.join(__dirname, '/fixtures/sample-small-website/_site'), {
configPath: path.join(__dirname, '/fixtures/sample-small-website/eleventy.config.js'),
let elev = new Eleventy(fixturePath('sample-small-website'), fixturePath('sample-small-website/_site'), {
configPath: fixturePath('sample-small-website/eleventy.config.js'),
});

let results = await elev.toJSON();
Expand Down

0 comments on commit ef1eb07

Please sign in to comment.