diff --git a/package.json b/package.json index e6e6f07e2..7933d47c9 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", "http-server": "^0.11.1", "mocha": "^6.1.4", "nyc": "^14.0.0", diff --git a/test/cli/cases/build.config.default/build.config.default.spec.js b/test/cli/cases/build.config.default/build.config.default.spec.js index a3658285a..0c4fa90a3 100644 --- a/test/cli/cases/build.config.default/build.config.default.spec.js +++ b/test/cli/cases/build.config.default/build.config.default.spec.js @@ -17,23 +17,23 @@ const runSmokeTest = require('../../smoke-test'); const TestBed = require('../../test-bed'); -describe('Build Greenwood With: ', async () => { +describe('Build Greenwood With: ', async function() { + const LABEL = 'Empty Configuration and Default Workspace'; let setup; - let context; - before(async () => { + before(async function() { setup = new TestBed(); - context = setup.setupTestBed(__dirname); + this.context = setup.setupTestBed(__dirname); }); - describe('Empty Configuration and Default Workspace', () => { - before(async () => { + describe(LABEL, function() { + before(async function() { await setup.runGreenwoodCommand('build'); }); - - it('should pass all smoke tests', async () => { - await runSmokeTest(context, setup, 'Empty Configuration and Default Workspace'); - }); + runSmokeTest(['public', 'index', 'not-found', 'hello'], LABEL); + }); + + after(function() { + setup.teardownTestBed(); }); - }); \ No newline at end of file diff --git a/test/cli/cases/build.config.error-public-path/build.config.error-public-path.spec.js b/test/cli/cases/build.config.error-public-path/build.config.error-public-path.spec.js index e107a73bf..869fdbf8d 100644 --- a/test/cli/cases/build.config.error-public-path/build.config.error-public-path.spec.js +++ b/test/cli/cases/build.config.error-public-path/build.config.error-public-path.spec.js @@ -28,7 +28,7 @@ describe('Build Greenwood With: ', () => { }); describe('Custom Configuration with a bad value for Public Path', () => { - it('should throw an error that publicPath must be a dtring', async () => { + it('should throw an error that publicPath must be a string', async () => { try { await setup.runGreenwoodCommand('build'); } catch (err) { @@ -36,5 +36,9 @@ describe('Build Greenwood With: ', () => { } }); }); + + after(function() { + setup.teardownTestBed(); + }); }); \ No newline at end of file diff --git a/test/cli/cases/build.config.error-workspace/build.config.error-workspace.spec.js b/test/cli/cases/build.config.error-workspace/build.config.error-workspace.spec.js index 34dcc99bf..b90e95584 100644 --- a/test/cli/cases/build.config.error-workspace/build.config.error-workspace.spec.js +++ b/test/cli/cases/build.config.error-workspace/build.config.error-workspace.spec.js @@ -28,7 +28,7 @@ describe('Build Greenwood With: ', () => { }); describe('Custom Configuration with a bad value for Workspace', () => { - it('should throw an error that workspace path must be a dtring', async () => { + it('should throw an error that workspace path must be a string', async () => { try { await setup.runGreenwoodCommand('build'); } catch (err) { @@ -37,4 +37,8 @@ describe('Build Greenwood With: ', () => { }); }); + after(function() { + setup.teardownTestBed(); + }); + }); \ No newline at end of file diff --git a/test/cli/cases/build.config.workspace-custom/build.config.workspace-custom.spec.js b/test/cli/cases/build.config.workspace-custom/build.config.workspace-custom.spec.js index c3a36a0c0..e09e3a355 100644 --- a/test/cli/cases/build.config.workspace-custom/build.config.workspace-custom.spec.js +++ b/test/cli/cases/build.config.workspace-custom/build.config.workspace-custom.spec.js @@ -19,23 +19,23 @@ const runSmokeTest = require('../../smoke-test'); const TestBed = require('../../test-bed'); -describe('Build Greenwood With: ', () => { +describe('Build Greenwood With: ', function() { + const LABEL = 'Custom Configuration for Workspace (www) and Default Greenwood configuration'; let setup; - let context; - before(async () => { + before(async function() { setup = new TestBed(); - context = setup.setupTestBed(__dirname); + this.context = setup.setupTestBed(__dirname); }); - describe('Custom Configuration for Workspace (www) and Default Greenwood configuration', () => { - before(async () => { + describe(LABEL, function() { + before(async function() { await setup.runGreenwoodCommand('build'); }); - - it('should pass all smoke tests', async () => { - await runSmokeTest(context, setup, 'Custom Configuration for Workspace (www) and Default Greenwood configuration'); - }); + runSmokeTest(['public', 'index', 'not-found'], LABEL); }); + after(function() { + setup.teardownTestBed(); + }); }); \ No newline at end of file diff --git a/test/cli/cases/build.default.workspace-nested/build.default.workspace-nested.spec.js b/test/cli/cases/build.default.workspace-nested/build.default.workspace-nested.spec.js index d965d06c1..3fa00e3ca 100644 --- a/test/cli/cases/build.default.workspace-nested/build.default.workspace-nested.spec.js +++ b/test/cli/cases/build.default.workspace-nested/build.default.workspace-nested.spec.js @@ -25,46 +25,44 @@ const path = require('path'); const TestBed = require('../../test-bed'); // TODO why does this case need a src/pages/index.md? -describe('Build Greenwood With: ', () => { +describe('Build Greenwood With: ', function() { + const LABEL = 'Default Greenwood Configuration and Default Workspace w/ Nested Directories'; let setup; - let context; - before(async () => { + before(async function() { setup = new TestBed(); - context = setup.setupTestBed(__dirname); + this.context = setup.setupTestBed(__dirname); }); - describe('Default Greenwood Configuration and Default Workspace w/ Nested Directories', () => { - before(async () => { + describe(LABEL, function() { + before(async function() { await setup.runGreenwoodCommand('build'); }); + + runSmokeTest(['public', 'not-found', 'index'], LABEL); - xit('should pass all smoke tests', async () => { - await runSmokeTest(context, setup, 'Default Greenwood Configuration and Default Workspace w/ Nested Directories'); - }); - - it('should create a default blog page directory', () => { - expect(fs.existsSync(path.join(context.publicDir, './blog'))).to.be.true; + it('should create a default blog page directory', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './blog'))).to.be.true; }); - describe('Custom blog page directory', () => { + describe('Custom blog page directory', function() { let dom; - beforeEach(async() => { - dom = await JSDOM.fromFile(path.resolve(context.publicDir, 'blog', '2019', './index.html')); + beforeEach(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, 'blog', '2019', './index.html')); }); - it('should output an index.html file within the default hello page directory', () => { - expect(fs.existsSync(path.join(context.publicDir, 'blog', '2019', './index.html'))).to.be.true; + it('should output an index.html file within the default hello page directory', function() { + expect(fs.existsSync(path.join(this.context.publicDir, 'blog', '2019', './index.html'))).to.be.true; }); - it('should have the expected heading text within the hello example page in the hello directory', async() => { + it('should have the expected heading text within the hello example page in the hello directory', async function() { const heading = dom.window.document.querySelector('h3').textContent; expect(heading).to.equal('Blog Page'); }); - it('should have the expected paragraph text within the hello example page in the hello directory', async() => { + it('should have the expected paragraph text within the hello example page in the hello directory', async function() { let paragraph = dom.window.document.querySelector('p').textContent; expect(paragraph).to.equal('This is the test blog page built by Greenwood.'); @@ -72,7 +70,7 @@ describe('Build Greenwood With: ', () => { }); }); - after(() => { + after(function() { setup.teardownTestBed(); }); diff --git a/test/cli/cases/build.default.workspace-template-app/build.default.workspace-template-app.spec.js b/test/cli/cases/build.default.workspace-template-app/build.default.workspace-template-app.spec.js index 7ee28b3fb..d155dab2b 100644 --- a/test/cli/cases/build.default.workspace-template-app/build.default.workspace-template-app.spec.js +++ b/test/cli/cases/build.default.workspace-template-app/build.default.workspace-template-app.spec.js @@ -22,45 +22,89 @@ const { JSDOM } = require('jsdom'); const path = require('path'); const TestBed = require('../../test-bed'); -describe('Build Greenwood With: ', () => { +describe('Build Greenwood With: ', function() { + const LABEL = 'Default Greenwood Configuration and Workspace w/Custom App Template'; let setup; - let context; - before(async () => { + before(async function() { setup = new TestBed(); - context = setup.setupTestBed(__dirname); + this.context = setup.setupTestBed(__dirname); }); - describe('Default Greenwood Configuration and Workspace w/Custom App Template', () => { + describe(LABEL, function() { let dom; before(async () => { await setup.runGreenwoodCommand('build'); }); - xit('should pass all smoke tests', async () => { - await runSmokeTest(context, setup, 'Default Greenwood Configuration and Workspace w/Custom App Template'); + runSmokeTest(['public', 'not-found', 'hello'], LABEL); + + describe('Custom Index (Home) page', function() { + const indexPageHeading = 'Greenwood'; + const indexPageBody = 'This is the home page built by Greenwood. Make your own pages in src/pages/index.js!'; + let dom; + + beforeEach(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, 'index.html')); + }); + + it('should have a tag in the <head>', function() { + const title = dom.window.document.querySelector('head title').textContent; + + expect(title).to.be.equal('My App'); + }); + + it('should have a <script> tag in the <body>', function() { + const scriptTag = dom.window.document.querySelectorAll('body script'); + + expect(scriptTag.length).to.be.equal(1); + }); + + it('should have a router outlet tag in the <body>', function() { + const outlet = dom.window.document.querySelectorAll('body eve-app'); + + expect(outlet.length).to.be.equal(1); + }); + + // no 404 route in our custom app-template.js, like greenwood does + it('should have the correct route tags in the <body>', function() { + const routes = dom.window.document.querySelectorAll('body lit-route'); + + expect(routes.length).to.be.equal(2); + }); + + it('should have the expected heading text within the index page in the public directory', function() { + const heading = dom.window.document.querySelector('h3').textContent; + + expect(heading).to.equal(indexPageHeading); + }); + + it('should have the expected paragraph text within the index page in the public directory', function() { + let paragraph = dom.window.document.querySelector('p').textContent; + + expect(paragraph).to.equal(indexPageBody); + }); }); - describe('Custom App Template', () => { - before(async() => { - dom = await JSDOM.fromFile(path.resolve(context.publicDir, 'index.html')); + describe('Custom App Template', function() { + before(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, 'index.html')); }); - it('should output a single index.html file using our custom app template', () => { - expect(fs.existsSync(path.join(context.publicDir, './index.html'))).to.be.true; + it('should output a single index.html file using our custom app template', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './index.html'))).to.be.true; }); - it('should have the specific element we added as part of our custom app template', () => { + it('should have the specific element we added as part of our custom app template', function() { const customParagraph = dom.window.document.querySelector('p#custom-app-template').textContent; expect(customParagraph).to.equal('My Custom App Template'); }); - - after(async () => { - setup.teardownTestBed(); - }); }); }); + after(function() { + setup.teardownTestBed(); + }); }); \ No newline at end of file diff --git a/test/cli/cases/build.default.workspace-template-page/build.default.workspace-template-page.spec.js b/test/cli/cases/build.default.workspace-template-page/build.default.workspace-template-page.spec.js index 08a505da5..b6496cfec 100644 --- a/test/cli/cases/build.default.workspace-template-page/build.default.workspace-template-page.spec.js +++ b/test/cli/cases/build.default.workspace-template-page/build.default.workspace-template-page.spec.js @@ -22,45 +22,43 @@ const { JSDOM } = require('jsdom'); const path = require('path'); const TestBed = require('../../test-bed'); -describe('Build Greenwood With: ', () => { +describe('Build Greenwood With: ', function() { + const LABEL = 'Default Greenwood Configuration and Workspace w/Custom Page Template'; let setup; - let context; - before(async () => { + before(async function() { setup = new TestBed(); - context = setup.setupTestBed(__dirname); + this.context = setup.setupTestBed(__dirname); }); - describe('Default Greenwood Configuration and Workspace w/Custom Page Template', () => { - before(async() => { + describe(LABEL, function() { + before(async function() { await setup.runGreenwoodCommand('build'); }); - xit('should pass all smoke tests', async () => { - await runSmokeTest(context, setup, 'Default Greenwood Configuration and Workspace w/Custom Page Template'); - }); + runSmokeTest(['public', 'index', 'not-found', 'hello'], LABEL); - describe('Custom Page Template', () => { + describe('Custom Page Template', function() { let dom; - before(async() => { - dom = await JSDOM.fromFile(path.resolve(context.publicDir, 'index.html')); + before(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, 'index.html')); }); - it('should output a single index.html file using our custom app template', () => { - expect(fs.existsSync(path.join(context.publicDir, './index.html'))).to.be.true; + it('should output a single index.html file using our custom app template', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './index.html'))).to.be.true; }); - it('should have the specific element we added as part of our custom page template', () => { + it('should have the specific element we added as part of our custom page template', function() { const customElement = dom.window.document.querySelectorAll('div.owen-test'); expect(customElement.length).to.equal(1); }); - - after(async () => { - setup.teardownTestBed(); - }); - }); + + }); + + after(function() { + setup.teardownTestBed(); }); }); \ No newline at end of file diff --git a/test/cli/cases/build.default/build.default.spec.js b/test/cli/cases/build.default/build.default.spec.js index e689122f6..f90612f0d 100644 --- a/test/cli/cases/build.default/build.default.spec.js +++ b/test/cli/cases/build.default/build.default.spec.js @@ -17,23 +17,24 @@ const runSmokeTest = require('../../smoke-test'); const TestBed = require('../../test-bed'); -describe('Build Greenwood With: ', () => { +describe('Build Greenwood With: ', function() { + const LABEL = 'Default Greenwood Configuration and Workspace'; let setup; - let context; - before(() => { + before(function() { setup = new TestBed(); - context = setup.setupTestBed(__dirname); + this.context = setup.setupTestBed(__dirname); }); - describe('Default Greenwood Configuration and Workspace', () => { - before(async () => { - await setup.runGreenwoodCommand('build'); - }); + describe(LABEL, function() { - it('should pass all smoke tests', async () => { - await runSmokeTest(context, setup, 'Default Greenwood Configuration and Workspace'); + before(async function() { + await setup.runGreenwoodCommand('build'); }); + runSmokeTest(['public', 'index', 'not-found', 'hello'], LABEL); }); + after(function() { + setup.teardownTestBed(); + }); }); \ No newline at end of file diff --git a/test/cli/smoke-test.js b/test/cli/smoke-test.js index d5511fe8f..db3e7035c 100644 --- a/test/cli/smoke-test.js +++ b/test/cli/smoke-test.js @@ -4,141 +4,162 @@ const glob = require('glob-promise'); const { JSDOM } = require('jsdom'); const path = require('path'); -// TODO break out smoke tests per feature? -// home page -// 404 page -// <some> page -module.exports = runSmokeTest = (context, setup, label) => { - return new Promise((resolve) => { - - describe(`Running Smoke Tests: ${label}`, () => { - - describe('Public Directory Generated Output', () => { - - it('should create a public directory', () => { - expect(fs.existsSync(context.publicDir)).to.be.true; - }); - - it('should output a single index.html file (home page)', () => { - expect(fs.existsSync(path.join(context.publicDir, './index.html'))).to.be.true; - }); - - it('should output a single 404.html file (not found page)', () => { - expect(fs.existsSync(path.join(context.publicDir, './404.html'))).to.be.true; - }); - - it('should output one JS bundle file', async () => { - expect(await glob.promise(path.join(context.publicDir, './index.*.bundle.js'))).to.have.lengthOf(1); - }); - - it('should output a hello page directory', () => { - expect(fs.existsSync(path.join(context.publicDir, './hello'))).to.be.true; - }); - - describe('Index (Home) page', () => { - const indexPageHeading = 'Greenwood'; - const indexPageBody = 'This is the home page built by Greenwood. Make your own pages in src/pages/index.js!'; - let dom; - - beforeEach(async() => { - dom = await JSDOM.fromFile(path.resolve(context.publicDir, 'index.html')); - }); - - it('should have a <title> tag in the <head>', () => { - const title = dom.window.document.querySelector('head title').textContent; - - expect(title).to.be.equal('My App'); - }); - - it('should have a <script> tag in the <body>', () => { - const scriptTag = dom.window.document.querySelectorAll('body script'); - - expect(scriptTag.length).to.be.equal(1); - }); - - it('should have a router outlet tag in the <body>', () => { - const outlet = dom.window.document.querySelectorAll('body eve-app'); - - expect(outlet.length).to.be.equal(1); - }); - - it('should have the correct route tags in the <body>', () => { - const routes = dom.window.document.querySelectorAll('body lit-route'); - - expect(routes.length).to.be.equal(3); - }); - - it('should have the expected heading text within the index page in the public directory', () => { - const heading = dom.window.document.querySelector('h3').textContent; - - expect(heading).to.equal(indexPageHeading); - }); - - it('should have the expected paragraph text within the index page in the public directory', () => { - let paragraph = dom.window.document.querySelector('p').textContent; - - expect(paragraph).to.equal(indexPageBody); - }); - }); - - describe('404 (Not Found) page', () => { - let dom; - - beforeEach(async() => { - dom = await JSDOM.fromFile(path.resolve(context.publicDir, '404.html')); - }); - - it('should have a <script> tag in the <body>', () => { - const scriptTag = dom.window.document.querySelectorAll('body script'); - - expect(scriptTag.length).to.be.equal(1); - }); - - it('should have a <title> tag in the <head>', () => { - const title = dom.window.document.querySelector('head title').textContent; - - expect(title).to.be.equal('404 - Not Found'); - }); - - it('should have a <h1> tag in the <body>', () => { - const heading = dom.window.document.querySelector('body h1').textContent; - - expect(heading).to.be.equal('404 Not Found'); - }); - }); - - describe('default generated hello page directory', () => { - const helloPageHeading = 'Hello World'; - const helloPageBody = 'This is an example page built by Greenwood. Make your own in src/pages!'; - let dom; - - beforeEach(async() => { - dom = await JSDOM.fromFile(path.resolve(context.publicDir, './hello', './index.html')); - }); - - it('should output an index.html file within the default hello page directory', () => { - expect(fs.existsSync(path.join(context.publicDir, './hello', './index.html'))).to.be.true; - }); - - it('should have the expected heading text within the hello example page in the hello directory', () => { - const heading = dom.window.document.querySelector('h3').textContent; - - expect(heading).to.equal(helloPageHeading); - }); - - it('should have the expected paragraph text within the hello example page in the hello directory', () => { - let paragraph = dom.window.document.querySelector('p').textContent; - - expect(paragraph).to.equal(helloPageBody); - }); - }); +function publicDirectory(label) { + describe(`Running Smoke Tests: ${label}`, function() { + describe('Public Directory Generated Output', function() { + it('should create a public directory', function() { + expect(fs.existsSync(this.context.publicDir)).to.be.true; + }); + + it('should output a single index.html file (home page)', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './index.html'))).to.be.true; + }); + + it('should output a single 404.html file (not found page)', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './404.html'))).to.be.true; + }); + + it('should output one JS bundle file', async function() { + expect(await glob.promise(path.join(this.context.publicDir, './index.*.bundle.js'))).to.have.lengthOf(1); }); }); + }); +} + +function defaultNotFound(label) { + describe(`Running Smoke Tests: ${label}`, function() { + describe('404 (Not Found) page', function() { + let dom; - resolve(); + beforeEach(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, '404.html')); + }); + + it('should have a <script> tag in the <body>', function() { + const scriptTag = dom.window.document.querySelectorAll('body script'); + + expect(scriptTag.length).to.be.equal(1); + }); + + it('should have a <title> tag in the <head>', function() { + const title = dom.window.document.querySelector('head title').textContent; + + expect(title).to.be.equal('404 - Not Found'); + }); - after(() => { - setup.teardownTestBed(); + it('should have a <h1> tag in the <body>', function() { + const heading = dom.window.document.querySelector('body h1').textContent; + + expect(heading).to.be.equal('404 Not Found'); + }); }); }); +} + +function defaultIndex(label) { + describe(`Running Smoke Tests: ${label}`, function() { + describe('Index (Home) page', function() { + const indexPageHeading = 'Greenwood'; + const indexPageBody = 'This is the home page built by Greenwood. Make your own pages in src/pages/index.js!'; + let dom; + + beforeEach(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, 'index.html')); + }); + + it('should have a <title> tag in the <head>', function() { + const title = dom.window.document.querySelector('head title').textContent; + + expect(title).to.be.equal('My App'); + }); + + it('should have a <script> tag in the <body>', function() { + const scriptTag = dom.window.document.querySelectorAll('body script'); + + expect(scriptTag.length).to.be.equal(1); + }); + + it('should have a router outlet tag in the <body>', function() { + const outlet = dom.window.document.querySelectorAll('body eve-app'); + + expect(outlet.length).to.be.equal(1); + }); + + it('should have the correct route tags in the <body>', function() { + const routes = dom.window.document.querySelectorAll('body lit-route'); + + expect(routes.length).to.be.equal(3); + }); + + it('should have the expected heading text within the index page in the public directory', function() { + const heading = dom.window.document.querySelector('h3').textContent; + + expect(heading).to.equal(indexPageHeading); + }); + + it('should have the expected paragraph text within the index page in the public directory', function() { + let paragraph = dom.window.document.querySelector('p').textContent; + + expect(paragraph).to.equal(indexPageBody); + }); + }); + }); +} + +function defaultHelloPage(label) { + describe(`Running Smoke Tests: ${label}`, function() { + describe('Hello World (dummy) page', function() { + const helloPageHeading = 'Hello World'; + const helloPageBody = 'This is an example page built by Greenwood. Make your own in src/pages!'; + let dom; + + beforeEach(async function() { + dom = await JSDOM.fromFile(path.resolve(this.context.publicDir, './hello', './index.html')); + }); + + it('should output a hello page directory', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './hello'))).to.be.true; + }); + it('should output an index.html file within the default hello page directory', function() { + expect(fs.existsSync(path.join(this.context.publicDir, './hello', './index.html'))).to.be.true; + }); + + it('should have the expected heading text within the hello example page in the hello directory', function() { + const heading = dom.window.document.querySelector('h3').textContent; + + expect(heading).to.equal(helloPageHeading); + }); + + it('should have the expected paragraph text within the hello example page in the hello directory', function() { + let paragraph = dom.window.document.querySelector('p').textContent; + + expect(paragraph).to.equal(helloPageBody); + }); + }); + }); +} + +module.exports = runSmokeTest = async function(testCases, label) { + + testCases.forEach(async (testCase) => { + switch (testCase) { + + case 'not-found': + defaultNotFound(label); + break; + case 'index': + defaultIndex(label); + break; + case 'hello': + defaultHelloPage(label); + break; + case 'public': + publicDirectory(label); + break; + default: + console.log(`unknown case ${testCase}`); // eslint-disable-line console + break; + + } + }); }; \ No newline at end of file diff --git a/test/cli/test-bed.js b/test/cli/test-bed.js index af1420c04..0afd6866f 100644 --- a/test/cli/test-bed.js +++ b/test/cli/test-bed.js @@ -35,6 +35,8 @@ module.exports = class TestBed { this.publicDir = path.join(this.rootDir, 'public'); this.buildDir = path.join(this.rootDir, '.greenwood'); + this.teardownTestBed(); + return { publicDir: this.publicDir }; @@ -77,43 +79,4 @@ module.exports = class TestBed { }); }); } -}; - -// describe('a custom front-matter override page directory', () => { -// const defaultPageHeading = 'Custom FM Page'; -// const defaultPageBody = 'This is a custom fm page built by Greenwood.'; -// let dom; - -// beforeEach(async() => { -// dom = await JSDOM.fromFile(customFMPageHtmlPath); -// }); - -// it('should contain a customfm folder with an index html file', () => { -// expect(fs.existsSync(customFMPageHtmlPath)).to.be.true; -// }); - -// it('should have the expected heading text within the customfm page in the customfm directory', async() => { -// const heading = dom.window.document.querySelector('h3.wc-md-customfm').textContent; - -// expect(heading).to.equal(defaultPageHeading); -// }); - -// it('should have the expected paragraph text within the customfm page in the customfm directory', async() => { -// let paragraph = dom.window.document.querySelector('p.wc-md-customfm').textContent; - -// expect(paragraph).to.equal(defaultPageBody); -// }); - -// it('should have the expected blog-template\'s blog-content class', async() => { -// let layout = dom.window.document.querySelector('.blog-content'); - -// expect(layout).to.not.equal(null); -// }); -// }); - -// after(async() => { -// await fs.remove(CONTEXT.userSrc); -// await fs.remove(CONTEXT.publicDir); -// await fs.remove(CONTEXT.scratchDir); -// }); -// }); \ No newline at end of file +}; \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 8cb6f0ff6..78a335e06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1875,13 +1875,6 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chai-as-promised@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - chai@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5"