Skip to content

Commit 115f688

Browse files
committed
fix: correct style errors
1 parent d62892d commit 115f688

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/device-id/src/get-device-id.spec.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ describe('getDeviceId', function () {
8383
expect(resultA).to.equal(resultB);
8484
});
8585

86-
it('handles timeout when getting machine id', async () => {
86+
it('handles timeout when getting machine id', async function () {
8787
let timeoutId: NodeJS.Timeout;
8888
const getMachineId = () =>
8989
new Promise<string>((resolve) => {
@@ -100,11 +100,13 @@ describe('getDeviceId', function () {
100100
timeout: 1,
101101
}).value;
102102

103+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
103104
clearTimeout(timeoutId!);
104105
expect(result).to.equal('unknown');
106+
expect(errorCalled).to.equal(false);
105107
});
106108

107-
it('handles external promise resolution', async () => {
109+
it('handles external promise resolution', async function () {
108110
let timeoutId: NodeJS.Timeout;
109111
const getMachineId = () =>
110112
new Promise<string>((resolve) => {
@@ -120,13 +122,14 @@ describe('getDeviceId', function () {
120122

121123
const result = await value;
122124

125+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
123126
clearTimeout(timeoutId!);
124127
expect(result).to.be.a('string');
125128
expect(result).to.equal('external-id');
126129
expect(result).to.not.equal('unknown');
127130
});
128131

129-
it('handles external promise rejection', async () => {
132+
it('handles external promise rejection', async function () {
130133
let timeoutId: NodeJS.Timeout;
131134
const getMachineId = () =>
132135
new Promise<string>((resolve) => {
@@ -142,6 +145,7 @@ describe('getDeviceId', function () {
142145

143146
reject(error);
144147

148+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
145149
clearTimeout(timeoutId!);
146150
try {
147151
await value;

0 commit comments

Comments
 (0)