From 608c59c88c039d3094d4a6b9f002341fbc753e71 Mon Sep 17 00:00:00 2001 From: Joschi Kuphal Date: Sat, 12 Jan 2019 17:09:17 +0100 Subject: [PATCH] Fix broken PHP test suite --- CHANGELOG.md | 3 +++ package.json | 6 +++--- test/php/php.js | 6 ++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de6486..ed7dfb3 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 0.6.2 Bugfix release (2018-01-12) +* Fix broken PHP test suite + ## 0.6.1 Maintenance release (2018-01-12) * Updated dependencies diff --git a/package.json b/package.json index 0425157..31eacd4 100755 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "shortbread", - "version": "0.6.1", + "version": "0.6.2", "description": "Asynchronous, non-blocking loading pattern for CSS and JavaScript resources", "main": "index.js", "scripts": { "test": "npm run build && eslint **/*.js && istanbul test _mocha --report html -- test/*.js --reporter spec", "coveralls": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage", "build": "babel lib --presets es2015-script --out-dir build", - "prepublish": "npm run build", - "php": "npm run build && node test/php/php.js && php -S 0.0.0.0:80 -t tmp" + "prepublishOnly": "npm run build", + "php": "npm run build && node test/php/php.js && php -S 0.0.0.0:8080 -t tmp" }, "repository": { "type": "git", diff --git a/test/php/php.js b/test/php/php.js index 787622b..3cdc020 100755 --- a/test/php/php.js +++ b/test/php/php.js @@ -8,15 +8,13 @@ const handlebars = require('handlebars'); fs.mkdirsSync(path.join(__dirname, '../tmp')); const criticalCSS = vinyl.readSync(path.join(__dirname, '../fixtures/critical.css')); -const criticalJS = vinyl.readSync(path.join(__dirname, '../fixtures/critical.js')); -criticalJS.path = `${criticalJS.base}/index.php?asset=critical.js`; const script = vinyl.readSync(path.join(__dirname, '../fixtures/script.js')); script.path = `${script.base}/index.php?asset=script.js`; -const js = [criticalJS, script]; +const js = [script]; const style = vinyl.readSync(path.join(__dirname, '../fixtures/style.css')); style.path = `${style.base}/index.php?asset=style.css`; const css = [style]; -const result = shortbread(js, css, [criticalCSS, criticalJS], 'main', 'allLoaded'); +const result = shortbread(js, css, criticalCSS, 'main', 'allLoaded'); // Compile and store the PHP test file const hbs = fs.readFileSync(path.join(__dirname, 'index.hbs'));