Skip to content

Commit 461aa04

Browse files
committed
sequelize update
1 parent c7d1528 commit 461aa04

File tree

8 files changed

+779
-9
lines changed

8 files changed

+779
-9
lines changed

rootfs_overlay/lkmc/nodejs/date.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env node
2+
3+
const assert = require('assert');
4+
5+
let date = new Date(2000, 0, 1, 2, 3, 4, 5);
6+
let date2 = new Date(2000, 0, 1, 2, 3, 4, 5);
7+
assert(date.getTime() === date2.getTime());
8+
assert(date.toString() === 'Sat Jan 01 2000 02:03:04 GMT+0000 (Greenwich Mean Time)');

rootfs_overlay/lkmc/nodejs/mocha.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
# Run mocha tests.
3+
npx mocha --require mocha_tests/global.js mocha_tests
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Global fixture.
2+
exports.mochaGlobalSetup = async function() {
3+
console.log('mochaGlobalSetup');
4+
};
5+
6+
// Root hook.
7+
exports.mochaHooks = {
8+
before(done) {
9+
console.log('mochaHooks.before');
10+
done();
11+
},
12+
beforeEach(done) {
13+
console.log('mochaHooks.beforeEach');
14+
done();
15+
},
16+
};
17+
18+
function myhelper() {
19+
console.error('myhelper');
20+
}
21+
22+
exports.myhelper = myhelper;
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
var assert = require('assert');
2+
3+
describe('describe0', function() {
4+
// Only runs before the current describe.
5+
before(async () => {
6+
myhelper();
7+
console.error('before describe 0');
8+
});
9+
beforeEach(async () => {
10+
console.error('beforeEach describe 0');
11+
});
12+
it('it 0 0', function() {
13+
assert.equal(0, 0);
14+
});
15+
it('it 0 1', function() {
16+
assert.equal(0, 0);
17+
});
18+
19+
describe('describe 0 0', function() {
20+
before(async () => {
21+
console.error('before describe 0 0');
22+
});
23+
beforeEach(async () => {
24+
console.error('beforeEach describe 0 0');
25+
});
26+
it('it 0 0 0', function() {
27+
assert.equal(0, 0);
28+
});
29+
it('it 0 0 1', function() {
30+
assert.equal(0, 0);
31+
});
32+
});
33+
34+
describe('describe 0 1', function() {
35+
before(async () => {
36+
console.error('before describe 0 1');
37+
});
38+
beforeEach(async () => {
39+
console.error('beforeEach describe 0 1');
40+
});
41+
it('it 0 1 0', function() {
42+
assert.equal(0, 0);
43+
});
44+
it('it 0 1 1', function() {
45+
assert.equal(0, 0);
46+
});
47+
});
48+
});

0 commit comments

Comments
 (0)