Skip to content

Commit

Permalink
Fix pug test (#2600)
Browse files Browse the repository at this point in the history
* Fix pug test

* Update pug.js
  • Loading branch information
mischnic authored and devongovett committed Jan 31, 2019
1 parent 0ada4d6 commit 791b4b8
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions packages/core/integration-tests/test/pug.js
@@ -1,7 +1,7 @@
const assert = require('assert');
const path = require('path');
const fs = require('@parcel/fs');
const {bundle, assertBundleTree, normaliseNewlines} = require('./utils');
const {bundle, assertBundleTree} = require('./utils');

describe('pug', function() {
it('should support bundling HTML', async function() {
Expand Down Expand Up @@ -58,17 +58,13 @@ describe('pug', function() {
assets: ['index.pug']
});

const html = normaliseNewlines(
await fs.readFile(path.join(__dirname, '/dist/index.html'), 'utf-8')
);
const expect = normaliseNewlines(
await fs.readFile(
path.join(__dirname, '/integration/pug-include-extends/expect.html'),
'utf-8'
)
const html = await fs.readFile(
path.join(__dirname, '/dist/index.html'),
'utf-8'
);

assert.equal(html, expect, 'Content mismatch');
assert(html.includes('<!DOCTYPE html>'));
assert(html.includes("<h1>Yep, it's working!</h1>"));
});

it('should support variables', async function() {
Expand Down

0 comments on commit 791b4b8

Please sign in to comment.