Skip to content

Commit

Permalink
Testing improvements
Browse files Browse the repository at this point in the history
* Switch to travis (it supports Windows now!)
* Fix test errors that were occuring in Windows
  • Loading branch information
hughsk committed Oct 19, 2018
1 parent 102fd2b commit 72884b9
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@ node_modules
*.log
.DS_Store
./bundle.js
package-lock.json
13 changes: 13 additions & 0 deletions .travis.yml
@@ -0,0 +1,13 @@
language: node_js
install: npm install
node_js:
- '4'
- '6'
- '8'
- '10'
os:
- linux
- windows
cache:
directories:
- 'node_modules'
4 changes: 3 additions & 1 deletion README.md
@@ -1,5 +1,5 @@
# glslify [![stability][0]][1]
[![npm version][2]][3] [![downloads][4]][5]
[![npm version][2]][3] [![downloads][4]][5] [![travis][6]][7]

A node.js-style module system for GLSL!

Expand Down Expand Up @@ -548,3 +548,5 @@ MIT. See [LICENSE.md](http://github.com/stackgl/glslify/blob/master/LICENSE.md)
[3]: https://npmjs.org/package/glslify
[4]: http://img.shields.io/npm/dm/glslify.svg?style=flat-square
[5]: https://npmjs.org/package/glslify
[6]: http://img.shields.io/travis/glslify/glslify.svg?style=flat-square
[7]: https://travis-ci.org/glslify/glslify
16 changes: 0 additions & 16 deletions appveyor.yml

This file was deleted.

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -8,9 +8,9 @@
},
"license": "MIT",
"scripts": {
"test": "npm run test-node && npm run test-electron",
"test-node": "node test | tap-spec",
"test-electron": "test/electron.sh"
"test": "npm run test:node",
"test:node": "node test",
"test:electron": "test/electron.sh"
},
"authors": [
"Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
Expand Down
14 changes: 7 additions & 7 deletions test/cli.js
Expand Up @@ -5,11 +5,11 @@ const test = require('tape')
const path = require('path')
const fs = require('fs')
const bl = require('bl')
const glslify = require.resolve('../bin')
const glslify = './bin.js'

test('cli: globe.frag', function(t) {
exec('node '+quote([ glslify,
path.join(__dirname, 'fixtures', 'globe.frag'),
exec('node ' + quote([ glslify,
path.join('test', 'fixtures', 'globe.frag'),
'-t', 'glslify-hex'
]), function(err, stdout, stderr) {
if (err) return t.ifError(err)
Expand All @@ -23,8 +23,8 @@ test('cli: globe.frag', function(t) {
})

test('cli: globe.vert', function(t) {
exec('node '+quote([ glslify,
path.join(__dirname, 'fixtures', 'globe.vert'),
exec('node ' + quote([ glslify,
path.join('test', 'fixtures', 'globe.vert'),
'-t', 'glslify-hex'
]), function(err, stdout, stderr) {
if (err) return t.ifError(err)
Expand All @@ -46,7 +46,7 @@ test('cli: globe.vert', function(t) {
test.skip('cli: globe.vert (inline)', function(t) {
var ps = spawn(glslify, [ '-t', 'glslify-hex' ])

fs.createReadStream(path.join(__dirname, 'fixtures', 'globe.vert'))
fs.createReadStream(path.join('test', 'fixtures', 'globe.vert'))
.pipe(ps.stdin)

ps.stdout.pipe(bl(function(err, stdout1) {
Expand All @@ -55,7 +55,7 @@ test.skip('cli: globe.vert (inline)', function(t) {
stdout1 += ''

exec(quote([ glslify,
path.join(__dirname, 'fixtures', 'globe.vert'),
path.join('test', 'fixtures', 'globe.vert'),
'-t', 'glslify-hex'
]), function(err, stdout2) {
if (err) return t.ifError(err)
Expand Down

0 comments on commit 72884b9

Please sign in to comment.