Files

26 lines
598 B
JavaScript
Raw Permalink Normal View History

import test from 'ava'
2025-04-21 17:41:49 +01:00
import { liblootVersion, isCompatible, Group } from '../index.js'
2025-04-21 17:41:49 +01:00
test('liblootVersion', t => {
t.is(liblootVersion(), process.env.npm_package_version)
2025-04-21 17:41:49 +01:00
});
test('isCompatible', t => {
2025-06-08 17:14:38 +01:00
t.is(isCompatible(0, 27, 0), true)
2025-04-21 17:41:49 +01:00
});
test('Group equality', t => {
const group1 = new Group("A");
const group2 = new Group("A");
const group3 = new Group("B");
t.deepEqual(group1.name, group2.name);
t.notDeepEqual(group1.name, group3.name);
t.deepEqual(group1, group2);
// The objects have no public fields so appear to be equal.
t.deepEqual(group1, group3);
})