scrabble-cheater 3.11.0 → 3.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -30,13 +30,13 @@
30
30
  "name": "scrabble-cheater",
31
31
  "repository": "https://github.com/ffflorian/node-packages/tree/main/packages/scrabble-cheater",
32
32
  "scripts": {
33
- "build": "tsc -p tsconfig.json",
33
+ "build": "tsc -p tsconfig.build.json",
34
34
  "clean": "rimraf dist",
35
35
  "dist": "yarn clean && yarn build",
36
36
  "start": "tsx src/cli.ts -d",
37
37
  "test": "vitest run"
38
38
  },
39
39
  "type": "module",
40
- "version": "3.11.0",
41
- "gitHead": "558b5c962cd6ad6e42e7c4917294cfddd2e60599"
40
+ "version": "3.11.2",
41
+ "gitHead": "0aaf2fa002773109356aa85ec77c5859032830b0"
42
42
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,25 +0,0 @@
1
- import path from 'node:path';
2
- import { assert, expect, describe, test } from 'vitest';
3
- import { ScrabbleCheater } from './index.js';
4
- const __dirname = import.meta.dirname;
5
- const wordList = path.resolve(__dirname, '../fixtures/wordlist.txt');
6
- const emptyList = path.resolve(__dirname, '../fixtures/empty.txt');
7
- describe('ScrabbleCheater', () => {
8
- test('finds all words', async () => {
9
- const sc = new ScrabbleCheater(wordList, { letters: 'her', quietMode: true });
10
- const matches = await sc.start();
11
- expect(matches.includes('here')).toBe(true);
12
- expect(matches.includes('her')).toBe(true);
13
- expect(matches.includes('he')).toBe(true);
14
- });
15
- test(`Doesn't accept an empty file`, async () => {
16
- const sc = new ScrabbleCheater(emptyList);
17
- try {
18
- await sc.start();
19
- assert.fail();
20
- }
21
- catch (_a) {
22
- // nothing to do
23
- }
24
- });
25
- });