Commit 6ef5b2d5 authored by Wolfram Kriesing's avatar Wolfram Kriesing

Make tests execute on nodejs and add `npm test` script.

parent a3dba52c
......@@ -7,6 +7,9 @@
"url": "git@github.com:wolframkriesing/discover-extract-dependencies.git",
"type": "git"
},
"scripts": {
"test": "mocha src/*spec.js"
},
"author": "Wolfram Kriesing <wolfram+github@kriesing.de>",
"license": "MIT",
"dependencies": {
......
export const fetch = () => '';
\ No newline at end of file
const fetch = () => '';
module.exports = { fetch };
\ No newline at end of file
import { fetch } from './backend';
const { assertThat, equalTo } = require('hamjest');
const { fetch } = require('./backend');
const cache = {};
export const loadStudent = ({ studentId }) => {
const loadStudent = ({ studentId }) => {
if (!cache[studentId]) {
cache[studentId] = fetch({ studentId });
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment