add kokushi test (#13262)

This commit is contained in:
im_tan 2024-02-12 09:06:00 +09:00 committed by GitHub
parent 3f810a856c
commit 622fc44645
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 0 deletions

View File

@ -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({