mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-03-29 05:29:42 -04:00
Add test to make sure version that are tested are mentioned in the RE… (#1276)
* Add test to make sure version that are tested are mentioned in the README * fix lint
This commit is contained in:
parent
614be919d0
commit
80d038bd61
2 changed files with 17 additions and 1 deletions
|
@ -13,7 +13,7 @@ Parse and serialize minecraft packets, plus authentication and encryption.
|
|||
|
||||
* Supports Minecraft PC version 1.7.10, 1.8.8, 1.9 (15w40b, 1.9, 1.9.1-pre2, 1.9.2, 1.9.4),
|
||||
1.10 (16w20a, 1.10-pre1, 1.10, 1.10.1, 1.10.2), 1.11 (16w35a, 1.11, 1.11.2), 1.12 (17w15a, 17w18b, 1.12-pre4, 1.12, 1.12.1, 1.12.2), and 1.13 (17w50a, 1.13, 1.13.1, 1.13.2-pre1, 1.13.2-pre2, 1.13.2), 1.14 (1.14, 1.14.1, 1.14.3, 1.14.4)
|
||||
, 1.15 (1.15, 1.15.1, 1.15.2) and 1.16 (20w13b, 20w14a, 1.16-rc1, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4), 1.17 (21w07a, 1.17, 1.17.1), 1.18 (1.18, 1.18.1 and 1.18.2), 1.19 (1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4), 1.20 (1.20, 1.20.1, 1.20.2)
|
||||
, 1.15 (1.15, 1.15.1, 1.15.2) and 1.16 (20w13b, 20w14a, 1.16-rc1, 1.16, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5), 1.17 (21w07a, 1.17, 1.17.1), 1.18 (1.18, 1.18.1 and 1.18.2), 1.19 (1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4), 1.20 (1.20, 1.20.1, 1.20.2)
|
||||
* Parses all packets and emits events with packet fields as JavaScript
|
||||
objects.
|
||||
* Send a packet by supplying fields as a JavaScript object.
|
||||
|
|
16
test/docTest.js
Normal file
16
test/docTest.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* eslint-env mocha */
|
||||
|
||||
const mc = require('../')
|
||||
const fs = require('fs')
|
||||
const assert = require('assert')
|
||||
const path = require('path')
|
||||
|
||||
const readmeContent = fs.readFileSync(path.join(__dirname, '/../docs/README.md'), { encoding: 'utf8', flag: 'r' })
|
||||
|
||||
for (const supportedVersion of mc.supportedVersions) {
|
||||
describe('doc ' + supportedVersion + 'v', function () {
|
||||
it('mentions the supported version in the readme', () => {
|
||||
assert.ok(readmeContent.includes(supportedVersion), `${supportedVersion} should be mentionned in the README.md but it is not`)
|
||||
})
|
||||
})
|
||||
}
|
Loading…
Add table
Reference in a new issue