forked from workshopper/javascripting
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (18 loc) · 667 Bytes
/
Copy pathindex.js
File metadata and controls
24 lines (18 loc) · 667 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var path = require('path');
var getFile = require('../../get-file');
var run = require('../../run-solution');
exports.problem = getFile(path.join(__dirname, 'problem.md'));
exports.solution = getFile(path.join(__dirname, 'solution.md'));
exports.fail = getFile(path.join(__dirname, 'troubleshooting.md'));
var expected = "{ toppings: [ 'cheese', 'sauce', 'pepperoni' ],\n"
+ " crust: 'deep dish',\n"
+ " serves: 2 }\n";
exports.verify = function (args, cb) {
run(args[0], function (err, result) {
if (result === expected) cb(true);
else cb(false);
});
};
exports.run = function (args) {
require(path.resolve(process.cwd(), args[0]));
};