New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

appc-cli-mocha

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appc-cli-mocha

simple, flexible, fun mocha framework extension with server response mock-ing

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

appc-cli-mocha Build Status

Features

  • Authomatically redirects all tthe raffic from the appc-cli to the internal request mocker
  • Added support for OS specific tests
  • Logs from appc-logger are automatically stored for easy access

Getting started

$ npm install -g appc-cli-mocha

This library depends on MochaJS.

API

All the features of appc-cli-mocha can be accessed as a library.

var core = require('appc-cli-mocha');
core.newTest('', {
	endpoints: [
		{
			method: 'all',
			path: '/*',
			/** [execute description] */
			handle: function (req, opts, res, next) {
				console.log('[MOCK-ADDR]', req.url);
				return next();
			}
		}...
	]
}, function (err, plugin) {
	var appc = this.appc,
		tmpDir = this.tmpDir,
		async = appc.async;

	describe('OS restrictive conditional tests', function () {
		it.mac('mac only condition', function () {

		});

		it.linux('linux only condition', function () {

		});

		it.win('win only condition', function () {

		});
	});

	describe('express test', function () {
		it('endpoint /test', function (done) {
			request({
				method: 'get',
				url: 'http://127.0.0.1:8118/test',
				json: true
			}, function (err, req, res) {
				should.not.exist(err);
				should(res).have.property('success');
				return done();
			});
		});
	});
});

Keywords

FAQs

Package last updated on 27 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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