Public | Automated Build

Last pushed: a year ago
Short Description
Test Runner for jsfor.me
Full Description

Test Runner for jsfor.me

Uses node.js vm module for tests sandboxing

docker run -d -p 3000:3000

Request example

POST: /api/runner/

{
    "code": {
        "src": "function f(a) {return a;}"
    },
    "tests": [{
        "name": "test1",
        "src": "lasdasdasdaog(1);"
    }, {
        "name": "test2",
        "src": "expect(f('bar1')).to.equal('bar');"
    }, {
        "name": "test3",
        "src": "expect(f('bar')).to.equal('bar');"
    }]
}

Response

[
  {
    "name": "ReferenceError",
    "message": "lasdasdasdaog is not defined"
  },
  {
    "name": "AssertionError",
    "message": "expected 'bar1' to equal 'bar'"
  },
  {
    "name": "Done",
    "message": "Done"
  }
]
Docker Pull Command
Owner
vadik49b
Source Repository

Comments (0)