developブランチマージ

This commit is contained in:
rinsuki 2019-10-19 04:43:08 +09:00
parent 7555c4778a
commit b34ae35803
403 changed files with 9381 additions and 3276 deletions

View file

@ -2,10 +2,10 @@
* Tests of API (visibility)
*
* How to run the tests:
* > mocha test/api-visibility.ts --require ts-node/register
* > npx mocha test/api-visibility.ts --require ts-node/register
*
* To specify test:
* > mocha test/api-visibility.ts --require ts-node/register -g 'test name'
* > npx mocha test/api-visibility.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true

View file

@ -2,10 +2,10 @@
* Tests of API
*
* How to run the tests:
* > mocha test/api.ts --require ts-node/register
* > npx mocha test/api.ts --require ts-node/register
*
* To specify test:
* > mocha test/api.ts --require ts-node/register -g 'test name'
* > npx mocha test/api.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true

View file

@ -2,10 +2,10 @@
* Tests of chart engine
*
* How to run the tests:
* > mocha test/chart.ts --require ts-node/register
* > npx mocha test/chart.ts --require ts-node/register
*
* To specify test:
* > mocha test/chart.ts --require ts-node/register -g 'test name'
* > npx mocha test/chart.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true
@ -320,4 +320,60 @@ describe('Chart', () => {
});
}));
});
describe('Resync', () => {
it('Can resync', async(async () => {
testChart.total = 1;
await testChart.resync();
const chartHours = await testChart.getChart('hour', 3);
const chartDays = await testChart.getChart('day', 3);
assert.deepStrictEqual(chartHours, {
foo: {
dec: [0, 0, 0],
inc: [0, 0, 0],
total: [1, 0, 0]
},
});
assert.deepStrictEqual(chartDays, {
foo: {
dec: [0, 0, 0],
inc: [0, 0, 0],
total: [1, 0, 0]
},
});
}));
it('Can resync (2)', async(async () => {
await testChart.increment();
clock.tick('01:00:00');
testChart.total = 100;
await testChart.resync();
const chartHours = await testChart.getChart('hour', 3);
const chartDays = await testChart.getChart('day', 3);
assert.deepStrictEqual(chartHours, {
foo: {
dec: [0, 0, 0],
inc: [0, 1, 0],
total: [100, 1, 0]
},
});
assert.deepStrictEqual(chartDays, {
foo: {
dec: [0, 0, 0],
inc: [1, 0, 0],
total: [100, 0, 0]
},
});
}));
});
});

View file

@ -2,10 +2,10 @@
* Tests of MFM
*
* How to run the tests:
* > mocha test/mfm.ts --require ts-node/register
* > npx mocha test/mfm.ts --require ts-node/register
*
* To specify test:
* > mocha test/mfm.ts --require ts-node/register -g 'test name'
* > npx mocha test/mfm.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true
@ -639,6 +639,20 @@ describe('MFM', () => {
text('/bar'),
]);
});
it('ignore Keycap Number Sign (U+0023 + U+20E3)', () => {
const tokens = parse('#⃣');
assert.deepStrictEqual(tokens, [
leaf('emoji', { emoji: '#⃣' })
]);
});
it('ignore Keycap Number Sign (U+0023 + U+FE0F + U+20E3)', () => {
const tokens = parse('#️⃣');
assert.deepStrictEqual(tokens, [
leaf('emoji', { emoji: '#️⃣' })
]);
});
});
describe('quote', () => {

View file

@ -2,10 +2,10 @@
* Tests of mute
*
* How to run the tests:
* > mocha test/mute.ts --require ts-node/register
* > npx mocha test/mute.ts --require ts-node/register
*
* To specify test:
* > mocha test/mute.ts --require ts-node/register -g 'test name'
* > npx mocha test/mute.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true

View file

@ -2,10 +2,10 @@
* Tests of Note
*
* How to run the tests:
* > mocha test/note.ts --require ts-node/register
* > npx mocha test/note.ts --require ts-node/register
*
* To specify test:
* > mocha test/note.ts --require ts-node/register -g 'test name'
* > npx mocha test/note.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true

View file

@ -2,10 +2,10 @@
* Tests of Maybe
*
* How to run the tests:
* > mocha test/prelude/maybe.ts --require ts-node/register
* > npx mocha test/prelude/maybe.ts --require ts-node/register
*
* To specify test:
* > mocha test/prelude/maybe.ts --require ts-node/register -g 'test name'
* > npx mocha test/prelude/maybe.ts --require ts-node/register -g 'test name'
*/
import * as assert from 'assert';

View file

@ -2,10 +2,10 @@
* Tests of MFM
*
* How to run the tests:
* > mocha test/reaction-lib.ts --require ts-node/register
* > npx mocha test/reaction-lib.ts --require ts-node/register
*
* To specify test:
* > mocha test/reaction-lib.ts --require ts-node/register -g 'test name'
* > npx mocha test/reaction-lib.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true

View file

@ -2,10 +2,10 @@
* Tests of streaming API
*
* How to run the tests:
* > mocha test/streaming.ts --require ts-node/register
* > npx mocha test/streaming.ts --require ts-node/register
*
* To specify test:
* > mocha test/streaming.ts --require ts-node/register -g 'test name'
* > npx mocha test/streaming.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true

View file

@ -2,10 +2,10 @@
* Tests of Note
*
* How to run the tests:
* > mocha test/user-notes.ts --require ts-node/register
* > npx mocha test/user-notes.ts --require ts-node/register
*
* To specify test:
* > mocha test/user-notes.ts --require ts-node/register -g 'test name'
* > npx mocha test/user-notes.ts --require ts-node/register -g 'test name'
*
* If the tests not start, try set following enviroment variables:
* TS_NODE_FILES=true and TS_NODE_TRANSPILE_ONLY=true