Skip to content

Commit a137555

Browse files
committed
Review more TODOs
1 parent ead571a commit a137555

5 files changed

Lines changed: 10 additions & 14 deletions

File tree

test-types/jasmine-async/types-jasmine.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ describe('type assertions', () => {
3737

3838
// @ts-expect-error
3939
await expectAsync(browser).toHaveUrl(6)
40-
//// @ts-expect-error TODO dprevost can we make the below fail?
41-
// await expectAsync(browser).toHaveUrl(wdioExpect.objectContaining({}))
4240
})
4341

4442
it('should have ts errors when actual is not a Browser element', async () => {
@@ -500,7 +498,7 @@ describe('type assertions', () => {
500498
expectPromiseVoid = expectAsync(promiseNetworkMock).not.toBeRequestedTimes({ gte: 5, lte: 10 })
501499

502500
expectPromiseVoid = expectAsync(promiseNetworkMock).toBeRequestedWith({
503-
url: 'http://localhost:8080/api/todo',
501+
url: 'http://localhost:8080/api',
504502
method: 'POST',
505503
statusCode: 200,
506504
requestHeaders: { Authorization: 'foo' },
@@ -546,7 +544,7 @@ describe('type assertions', () => {
546544

547545
// @ts-expect-error
548546
expectVoid = expectAsync(promiseNetworkMock).toBeRequestedWith({
549-
url: 'http://localhost:8080/api/todo',
547+
url: 'http://localhost:8080/api',
550548
method: 'POST',
551549
statusCode: 200,
552550
requestHeaders: { Authorization: 'foo' },

test-types/jasmine/types-jasmine.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ describe('type assertions', () => {
529529
expectPromiseVoid = wdioExpect(promiseNetworkMock).not.toBeRequestedTimes({ gte: 5, lte: 10 })
530530

531531
expectPromiseVoid = wdioExpect(promiseNetworkMock).toBeRequestedWith({
532-
url: 'http://localhost:8080/api/todo',
532+
url: 'http://localhost:8080/api',
533533
method: 'POST',
534534
statusCode: 200,
535535
requestHeaders: { Authorization: 'foo' },
@@ -575,7 +575,7 @@ describe('type assertions', () => {
575575

576576
// @ts-expect-error
577577
expectVoid = wdioExpect(promiseNetworkMock).toBeRequestedWith({
578-
url: 'http://localhost:8080/api/todo',
578+
url: 'http://localhost:8080/api',
579579
method: 'POST',
580580
statusCode: 200,
581581
requestHeaders: { Authorization: 'foo' },

test-types/jest-@jest_global/types-jest.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,6 @@ describe('type assertions', async () => {
519519
})
520520

521521
describe('Network Matchers', () => {
522-
// const promiseNetworkMock = browser.mock('**/api/todo*')
523522
const promiseNetworkMock = Promise.resolve(networkMock)
524523

525524
it('should not have ts errors when typing to Promise', async () => {
@@ -532,7 +531,7 @@ describe('type assertions', async () => {
532531
expectPromiseVoid = expect(promiseNetworkMock).not.toBeRequestedTimes({ gte: 5, lte: 10 })
533532

534533
expectPromiseVoid = expect(promiseNetworkMock).toBeRequestedWith({
535-
url: 'http://localhost:8080/api/todo',
534+
url: 'http://localhost:8080/api',
536535
method: 'POST',
537536
statusCode: 200,
538537
requestHeaders: { Authorization: 'foo' },
@@ -578,7 +577,7 @@ describe('type assertions', async () => {
578577

579578
// @ts-expect-error
580579
expectVoid = expect(promiseNetworkMock).toBeRequestedWith({
581-
url: 'http://localhost:8080/api/todo',
580+
url: 'http://localhost:8080/api',
582581
method: 'POST',
583582
statusCode: 200,
584583
requestHeaders: { Authorization: 'foo' },

test-types/jest-@types_jest/types-jest.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,6 @@ describe('type assertions', async () => {
525525
})
526526

527527
describe('Network Matchers', () => {
528-
// const promiseNetworkMock = browser.mock('**/api/todo*')
529528
const promiseNetworkMock = Promise.resolve(networkMock)
530529

531530
it('should not have ts errors when typing to Promise', async () => {
@@ -538,7 +537,7 @@ describe('type assertions', async () => {
538537
expectPromiseVoid = expect(promiseNetworkMock).not.toBeRequestedTimes({ gte: 5, lte: 10 })
539538

540539
expectPromiseVoid = expect(promiseNetworkMock).toBeRequestedWith({
541-
url: 'http://localhost:8080/api/todo',
540+
url: 'http://localhost:8080/api',
542541
method: 'POST',
543542
statusCode: 200,
544543
requestHeaders: { Authorization: 'foo' },
@@ -584,7 +583,7 @@ describe('type assertions', async () => {
584583

585584
// @ts-expect-error
586585
expectVoid = expect(promiseNetworkMock).toBeRequestedWith({
587-
url: 'http://localhost:8080/api/todo',
586+
url: 'http://localhost:8080/api',
588587
method: 'POST',
589588
statusCode: 200,
590589
requestHeaders: { Authorization: 'foo' },

test-types/mocha/types-mocha.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ describe('type assertions', () => {
544544
expectPromiseVoid = expect(promiseNetworkMock).not.toBeRequestedTimes({ gte: 5, lte: 10 })
545545

546546
expectPromiseVoid = expect(promiseNetworkMock).toBeRequestedWith({
547-
url: 'http://localhost:8080/api/todo',
547+
url: 'http://localhost:8080/api',
548548
method: 'POST',
549549
statusCode: 200,
550550
requestHeaders: { Authorization: 'foo' },
@@ -590,7 +590,7 @@ describe('type assertions', () => {
590590

591591
// @ts-expect-error
592592
expectVoid = expect(promiseNetworkMock).toBeRequestedWith({
593-
url: 'http://localhost:8080/api/todo',
593+
url: 'http://localhost:8080/api',
594594
method: 'POST',
595595
statusCode: 200,
596596
requestHeaders: { Authorization: 'foo' },

0 commit comments

Comments
 (0)