diff --git a/packages/misskey-mahjong/test/yaku.ts b/packages/misskey-mahjong/test/yaku.ts index 835ac1b5b8..6cbfbf100a 100644 --- a/packages/misskey-mahjong/test/yaku.ts +++ b/packages/misskey-mahjong/test/yaku.ts @@ -18,6 +18,26 @@ describe('Yaku', () => { }); }); + describe('kokushi', () => { + it('valid', () => { + assert.deepStrictEqual(calcYakus({ + house: 'e', + handTiles: ['m1', 'm9', 's1', 's9', 'p1', 'p9', 'haku', 'hatsu', 'chun', 'n', 'w', 's', 'e'] , + huros: [], + tumoTiles: 'm1', + }), ['kokushi']); + }); + it('invalid', () => { + assert.deepStrictEqual(calcYakus({ + house: 'e', + handTiles: ['m1', 'm9', 's1', 's9', 'p1', 'p9', 'haku', 'hatsu', 'chun', 'n', 'w', 's', 'e', 'm3'] , + huros: [], + tumoTiles: 'm3', + }).includes('kokushi'), false); + }); + }); + + describe('churen', () => { it('valid', () => { assert.deepStrictEqual(calcYakus({