Skip to content

Commit 11a322d

Browse files
committed
Add version comparison tests for pc 1.7.10
1 parent 9a5dc87 commit 11a322d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/load.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,12 @@ describe('supportFeature', () => {
101101
assert.equal(mcData.supportFeature('fakeRecipeSchema'), false)
102102
assert(mcData.blockMappings.length > 0)
103103
})
104+
105+
it('compares pc 1.7.10 correctly', function () {
106+
const mcData = require('minecraft-data')('1.7.10')
107+
assert.strictEqual(mcData.isNewerOrEqualTo('1.7.9'), true)
108+
assert.strictEqual(mcData.isOlderThan('1.8'), true)
109+
assert.strictEqual(mcData.isOlderThan('1.7.10'), false)
110+
assert.strictEqual(mcData.isNewerOrEqualTo('1.7.10'), true)
111+
})
104112
})

0 commit comments

Comments
 (0)