Skip to content

Commit 64e8add

Browse files
committed
sequelize sqlite
1 parent 461aa04 commit 64e8add

File tree

7 files changed

+1287
-11
lines changed

7 files changed

+1287
-11
lines changed

rootfs_overlay/lkmc/nodejs/express.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env node
2+
3+
const express = require('express')
4+
const app = express()
5+
const port = 3000
6+
7+
app.get('/', (req, res) => {
8+
res.send('Hello World!')
9+
})
10+
11+
app.listen(port, () => {
12+
console.log(`Example app listening at http://localhost:${port}`)
13+
})

rootfs_overlay/lkmc/nodejs/mocha.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22
# Run mocha tests.
3-
npx mocha --require mocha_tests/global.js mocha_tests
3+
npx mocha --require mocha/utils.js mocha

rootfs_overlay/lkmc/nodejs/mocha_tests/mytest.js renamed to rootfs_overlay/lkmc/nodejs/mocha/mytest.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ var assert = require('assert');
33
describe('describe0', function() {
44
// Only runs before the current describe.
55
before(async () => {
6-
myhelper();
76
console.error('before describe 0');
87
});
98
beforeEach(async () => {

rootfs_overlay/lkmc/nodejs/mocha_tests/global.js renamed to rootfs_overlay/lkmc/nodejs/mocha/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ exports.mochaHooks = {
1515
},
1616
};
1717

18+
// TODO don't know a better way to make this available
19+
// to test files than just requiring it by relative path.
1820
function myhelper() {
1921
console.error('myhelper');
2022
}
21-
2223
exports.myhelper = myhelper;

0 commit comments

Comments
 (0)