Git Product home page Git Product logo

node-mysql-runner's Introduction

node-mysql-runner

This node-mysql runner works with a node project.

What it Does

This node 8-alpine runner installs the dependencies using npm install. The dependencies must be specified in the package.json file at the project root as specified in the official documentation.

It also sets up a MySQL server.

How to Use

In order to use this runner in your project, edit the techio.yml file and add the following lines to your project:

runner: rwoverdijk/node-mysql-runner

Example

In this example, the student is asked to write a method toUpper() (file uppercase.js):

function toUpper(str) {
	return str.toUpperCase();
}
module.exports = toUpper;

In order to test the answer, the following unit test is created (file tests/test.js):

var toUpper = require('./uppercase.js');
var assert = require('assert');
it('should return HELLO', function() {
	assert.equal('HELLO', toUpper('hello'));
});
it('should return WORLD', function() {
	assert.equal('WORLD', toUpper('world'));
});

We include the unit testing library mocha in the package.json file:

{
	"dependencies": {
		"mocha": "*",
		"should": ">= 0.0.1"
	}
}

In the lesson, the unit test can be called using:

@[Test unittest: uppercase]({"stubs":["uppercase.js"], "command":"node_modules/mocha/bin/mocha test.js --reporter list"})

node-mysql-runner's People

Contributors

rwoverdijk avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.