refactor: use gts instead of xo

feat: add browser opening to test:notification
feat: add c8 and mocha for testing
feat: update Docker and ci
style: update editorconfig
This commit is contained in:
Jef LeCompte
2021-01-17 15:00:31 -05:00
parent dbde7814af
commit f87053cb02
184 changed files with 29898 additions and 32899 deletions
+38
View File
@@ -0,0 +1,38 @@
import {Link, Store} from '../../src/store/model';
import open from 'open';
import {sendNotification} from '../../src/notification';
import {config} from '../../src/config';
const link: Link = {
brand: 'test:brand',
cartUrl: 'https://www.example.com/cartUrl',
model: 'test:model',
price: 100,
series: 'test:series',
url: 'https://www.example.com/url',
};
const store: Store = {
currency: '',
labels: {
inStock: {
container: 'test:container',
text: ['test:text'],
},
},
links: [link],
name: 'test:name',
};
/**
* Send test email.
*/
sendNotification(link, store);
/**
* Open browser.
*/
if (config.browser.open) {
open(link.cartUrl ?? link.url);
open(link.url);
}