Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pug test #2600

Merged
merged 2 commits into from
Jan 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions packages/core/integration-tests/test/pug.js
Original file line number Diff line number Diff line change
@@ -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