Skip to content

Commit 1ac957e

Browse files
committed
Minor corrections to directories
1 parent 033b37c commit 1ac957e

4 files changed

+12
-13
lines changed

pug/package.json

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
"directories": {
1919
"test": "test"
2020
},
21-
"scripts": {
22-
"test": "node --test",
23-
"test:cov": "node --test --experimental-test-coverage",
24-
"test-watch": "node --test --watch"
25-
},
21+
"scripts": {
22+
"test": "echo \"Error: run tests from root directory\" && exit 1"
23+
},
2624
"repository": {
2725
"type": "git",
2826
"url": "git+https://github.com/Zearin/eleventy-plugin-pug.git"

pug/test/test-plugin-data-access.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ import Eleventy from "@11ty/eleventy";
1515

1616

1717
describe('SCENARIO: Global Data', function() {
18-
const input = "./test-stubs/data-access/_src/";
19-
const output = "./test-stubs/data-access/_site/";
20-
const configPath = "./test-stubs/data-access/eleventy.config.js";
18+
const GLOBAL_DATA_PROJECT_PATH = './pug/test-stubs/data-access'
19+
const input = path.join(GLOBAL_DATA_PROJECT_PATH, '_src')
20+
const output = path.join(GLOBAL_DATA_PROJECT_PATH, '_site')
21+
const options = {
22+
configPath: path.join(GLOBAL_DATA_PROJECT_PATH, "eleventy.config.js")
23+
}
2124

2225
context('GIVEN some global data', function() {
2326
before(function cleanPreviousTestOutputDirs() {
@@ -38,9 +41,7 @@ describe('SCENARIO: Global Data', function() {
3841
}
3942
})
4043

41-
let eleventyInstance = new Eleventy(input, output, {
42-
configPath
43-
})
44+
let eleventyInstance = new Eleventy(input, output, options)
4445

4546
it('The compilation can use the data ', async function() {
4647
await eleventyInstance.executeBuild()

pug/test/test-plugin-data-functions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Eleventy from '@11ty/eleventy'
1515

1616

1717
describe('SCENARIO: Global Data Function', function() {
18-
const GLOBAL_DATA_PROJECT_PATH = './test-stubs/data-functions'
18+
const GLOBAL_DATA_PROJECT_PATH = './pug/test-stubs/data-functions'
1919
const input = path.join(GLOBAL_DATA_PROJECT_PATH, '_src')
2020
const output = path.join(GLOBAL_DATA_PROJECT_PATH, '_site')
2121
const options = {

pug/test/test-plugin-minimal-setup.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('SCENARIO: Minimal possible setup', function() {
3939
})
4040

4141
context('GIVEN a minimal project and config', function() {
42-
const GLOBAL_DATA_PROJECT_PATH = './test-stubs/minimal'
42+
const GLOBAL_DATA_PROJECT_PATH = './pug/test-stubs/minimal'
4343
const input = path.join(GLOBAL_DATA_PROJECT_PATH, '_src')
4444
const output = path.join(GLOBAL_DATA_PROJECT_PATH, '_site')
4545
const options = {

0 commit comments

Comments
 (0)