UNPKG

dreemgl

Version:

DreemGL is an open-source multi-screen prototyping framework for mediated environments, with a visual editor and shader styling for webGL and DALi runtimes written in JavaScript. As a toolkit for gpu-accelerated multiscreen development, DreemGL includes

38 lines (31 loc) 842 B
var server = require('./server') , events = require('events') , assert = require('assert') , request = require('../index') ; var local = 'http://localhost:8888/asdf' try { request({uri:local, body:{}}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Argument error, options.body.') } try { request({uri:local, multipart: 'foo'}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Argument error, options.multipart.') } try { request({uri:local, multipart: [{}]}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Body attribute missing in multipart.') } try { request(local, {multipart: [{}]}) assert.fail("Should have throw") } catch(e) { assert.equal(e.message, 'Body attribute missing in multipart.') } console.log("All tests passed.")