Skip to content

Commit

Permalink
Fix broken PHP test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
jkphl committed Jan 12, 2019
1 parent d78d03f commit 608c59c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 2 additions & 4 deletions test/php/php.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'));
Expand Down

0 comments on commit 608c59c

Please sign in to comment.