How to use @serialport/binding-mock - 1 common examples

To help you get started, we’ve selected a few @serialport/binding-mock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esrlabs / chipmunk / application / sandbox / serial / process / src / services / service.ports.ts View on Github external
public create(path: string) {
        const SerialPortNamespace = require('@serialport/stream');
        const MockBinding = require('@serialport/binding-mock');
        SerialPortNamespace.Binding = MockBinding;
        MockBinding.createPort(path, { echo: true, record: true });
    }

@serialport/binding-mock

The mock serialport bindings

MIT
Latest version published 3 years ago

Package Health Score

51 / 100
Full package analysis

Popular @serialport/binding-mock functions