js-libp2p-websockets/gulpfile.js

23 lines
444 B
JavaScript
Raw Normal View History

2016-03-23 16:23:10 +01:00
'use strict'
const gulp = require('gulp')
const multiaddr = require('multiaddr')
const WS = require('./src')
2016-03-23 16:23:10 +01:00
let listener
2016-03-23 16:23:10 +01:00
gulp.task('test:browser:before', (done) => {
const ws = new WS()
const ma = multiaddr('/ip4/127.0.0.1/tcp/9090/ws')
listener = ws.createListener((conn) => {
conn.pipe(conn)
})
listener.listen(ma, done)
2016-03-23 16:23:10 +01:00
})
gulp.task('test:browser:after', (done) => {
listener.close(done)
2016-03-23 16:23:10 +01:00
})
2016-04-14 11:28:34 +01:00
require('aegir/gulp')(gulp)