Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-osc

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-osc - npm Package Compare versions

Comparing version 4.1.0 to 4.1.1

test/util.js

6

package.json
{
"name": "node-osc",
"description": "pyOSC inspired library",
"version": "4.1.0",
"version": "4.1.1",
"main": "lib/index.js",

@@ -39,5 +39,5 @@ "author": {

"devDependencies": {
"eslint": "^5.16.0",
"tap": "^12.6.1"
"eslint": "^6.0.1",
"tap": "^14.6.1"
}
}

@@ -5,7 +5,10 @@ 'use strict';

const { generatePort } = require('./util');
const osc = require('../lib');
test('client: with array', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);

@@ -26,4 +29,5 @@ t.plan(2);

test('client: with string', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);

@@ -44,4 +48,5 @@ t.plan(2);

test('client: with object', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);

@@ -71,3 +76,4 @@ t.plan(2);

test('client: failure', (t) => {
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const client = new osc.Client('0.0.0.0', port);

@@ -74,0 +80,0 @@ t.plan(1);

@@ -5,7 +5,10 @@ 'use strict';

const { generatePort } = require('./util');
const osc = require('../lib');
test('osc: argument message no callback', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);

@@ -24,4 +27,5 @@ t.plan(1);

test('osc: client with callback and message as arguments', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);

@@ -28,0 +32,0 @@ t.plan(2);

@@ -5,7 +5,10 @@ 'use strict';

const { generatePort } = require('./util');
const osc = require('../lib');
test('message: basic usage', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);
const m = new osc.Message('/address');

@@ -29,4 +32,5 @@ m.append('testing');

test('message: multiple args', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);
const m = new osc.Message('/address', 'testing', 123, true);

@@ -47,4 +51,5 @@

test('message: object', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);
const m = new osc.Message('/address');

@@ -73,4 +78,5 @@ m.append({

test('message: float', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);
const m = new osc.Message('/address');

@@ -96,4 +102,5 @@ m.append(3.14);

test('message: boolean', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);
const m = new osc.Message('/address');

@@ -118,4 +125,5 @@ m.append(true);

test('message: blob', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);
const buf = Buffer.from('test');

@@ -122,0 +130,0 @@ const m = new osc.Message('/address');

@@ -5,7 +5,10 @@ 'use strict';

const { generatePort } = require('./util');
const osc = require('../lib');
test('server: create and close', (t) => {
const port = generatePort();
t.plan(1);
const oscServer = new osc.Server(3333, '0.0.0.0');
const oscServer = new osc.Server(port, '0.0.0.0');
oscServer.close((err) => {

@@ -17,4 +20,5 @@ t.error(err);

test('client: listen to message', (t) => {
const oscServer = new osc.Server(3333, '0.0.0.0');
const client = new osc.Client('0.0.0.0', 3333);
const port = generatePort();
const oscServer = new osc.Server(port, '0.0.0.0');
const client = new osc.Client('0.0.0.0', port);

@@ -42,4 +46,5 @@ t.plan(3);

test('server: bad message', (t) => {
const port = generatePort();
t.plan(2);
const oscServer = new osc.Server(3333, '0.0.0.0');
const oscServer = new osc.Server(port, '0.0.0.0');
t.throws(() => {

@@ -54,4 +59,5 @@ oscServer._sock.emit('message', 'whoops');

test('server: legacy kill alias', (t) => {
const port = generatePort();
t.plan(1);
const oscServer = new osc.Server(3333, '0.0.0.0');
const oscServer = new osc.Server(port, '0.0.0.0');
process.noDeprecation = true;

@@ -58,0 +64,0 @@ oscServer.kill((err) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc