Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should passes when used properly', () => {
watchHeadingAsync(data => {
(data.trueHeading: number);
(data.magHeading: number);
(data.accuracy: number);
// $ExpectError: check any
(data.accuracy: string);
});
watchHeadingAsync(async () => {}).then(result => {
result.remove();
});
});
it('should raise an error when call function with invalid arguments', () => {
// $ExpectError: need a function
watchHeadingAsync(69);
});
});