fix(core): update
This commit is contained in:
24
test/test.ts
24
test/test.ts
@ -1,27 +1,27 @@
|
||||
import { expect, tap } from 'tapbundle'
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
|
||||
import * as smartanalytics from '../ts/index'
|
||||
import * as smartanalytics from '../ts/index';
|
||||
|
||||
let testAnalytics: smartanalytics.Analytics
|
||||
let testAnalytics: smartanalytics.Analytics;
|
||||
|
||||
tap.test('should create a valid AnalyticsAccount', async () => {
|
||||
testAnalytics = new smartanalytics.Analytics({
|
||||
projectId: 'sandbox',
|
||||
appName: 'smartanalytics',
|
||||
apiEndPoint: 'https://pubapi-1.lossless.one/analytics'
|
||||
})
|
||||
})
|
||||
apiEndPoint: 'https://pubapi.lossless.one/analytics'
|
||||
});
|
||||
});
|
||||
|
||||
tap.test('should send a request to Lossless API endpoint', async () => {
|
||||
let doit = async () => {
|
||||
await testAnalytics.recordEvent('sandbox', {
|
||||
trackingPurpose: 'test'
|
||||
})
|
||||
});
|
||||
await testAnalytics.recordEvent('sandbox', {
|
||||
someValue: 'someData'
|
||||
})
|
||||
}
|
||||
doit()
|
||||
})
|
||||
});
|
||||
};
|
||||
doit();
|
||||
});
|
||||
|
||||
tap.start()
|
||||
tap.start();
|
||||
|
Reference in New Issue
Block a user