fix(package): initial

This commit is contained in:
2018-08-19 15:17:59 +02:00
commit 0261936de7
10 changed files with 1142 additions and 0 deletions

24
test/test.ts Normal file
View File

@ -0,0 +1,24 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartfuzzy from '../ts/index';
let testSmartfuzzy: smartfuzzy.Smartfuzzy;
tap.test('should create an instance of Smartfuzzy', async () => {
testSmartfuzzy = new smartfuzzy.Smartfuzzy([
'Sony',
'Deutsche Bahn',
'Apple Inc.',
"Trader Joe's"
]);
expect(testSmartfuzzy).to.be.instanceof(smartfuzzy.Smartfuzzy);
});
tap.test('should compute a score', async () => {
testSmartfuzzy.getChangeScoreForString('Apple');
});
tap.test('should get closest match', async () => {
testSmartfuzzy.getClosestMatchForString('Apple');
});
tap.start();