Skip to content

Commit

Permalink
feat: Add node tests for utility functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-s-snyder committed Apr 23, 2024
1 parent ba6d0bc commit 7ec38a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 29 deletions.
29 changes: 0 additions & 29 deletions test/node/start-test.js

This file was deleted.

15 changes: 15 additions & 0 deletions test/node/util-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import assert from 'node:assert';
import { flattenRGB } from '../../src/util/util.js';

process.on('unhandledRejection', function(err) {
console.log(err);
process.exit(1);
});

describe('Util', async function() {
describe('#flattenRGB()', function() {
it('should flatten without error', function() {
assert.strictEqual(flattenRGB('rgb(255, 210, 130)'), (255 + 210 + 130));
});
});
});

0 comments on commit 7ec38a7

Please sign in to comment.