FedEx attempted delivery today at 4:02pm

Wolf

Slow Suicide's No Way To Go
OT Supporter
Mar 23, 2003
116,179
San Jose, CA
Bullshit you did! 😤

Been home the whole time, working on computer right next to front door.
No one knocked on door, no "missed delivery" notice on the door.
Didn't even hear anyone climbing the stairs.

Lying ass delivery man. :fawk2:
 
TS
TS
Wolf

Wolf

Slow Suicide's No Way To Go
OT Supporter
Mar 23, 2003
116,179
San Jose, CA
Don’t lie you were fapping
I was writing test cases for this fucking API.

JavaScript:
 test("endpoint GET /resources", async () => {
   const baseModelMock = jest.mock('../models/baseModel');
   const getAllSpy = baseModelMock.spyOn(BaseModel.prototype, 'getAll');
   getAllSpy.mockResolvedValue(['resource1']);

    const { body } = await request(app)
      .get("/resources")
      .expect(200);

    expect(getAllSpy).toBeCalledTimes(1);
    expect(body).toStrictEqual(["resource1"]);
  });


Took me all day to figure out I needed to add .prototype to the end of the class in spyOn.
 

Russel's Teapot

Well-Known Member
Nov 19, 2012
3,002
All delivery companies are the same. Last time I had something delivered I hadn't even had time to type "Yes" to say I was home before they sent me the next text saying that I wasn't home when delivery was attempted. Fuckers then told me to pick up my delivery from 2 different centres on opposite sides of town.
 

jr.mac42

OT Supporter
Dec 26, 2017
1,176
La Mesa
All delivery companies are the same. Last time I had something delivered I hadn't even had time to type "Yes" to say I was home before they sent me the next text saying that I wasn't home when delivery was attempted. Fuckers then told me to pick up my delivery from 2 different centres on opposite sides of town.

liar
 

Hops

OT Supporter
Aug 28, 2003
11,920
Sierra Foothills, CA
I fucking hate those guys that pull that shit. I get the "package was left at front door" and I find the damn thing at the community gate 1/4 mile away.
 

wait*what

OT Supporter
Mar 8, 2007
93,149
Houston, TX
call fedex and say you played back your security cams and didn't see any delivery attempt at the time stated
always seems to work for me

package shows up with the quickness
 

Fifafever

OT Supporter
Jul 22, 2006
9,307
San Diego
I was writing test cases for this fucking API.

JavaScript:
 test("endpoint GET /resources", async () => {
   const baseModelMock = jest.mock('../models/baseModel');
   const getAllSpy = baseModelMock.spyOn(BaseModel.prototype, 'getAll');
   getAllSpy.mockResolvedValue(['resource1']);

    const { body } = await request(app)
      .get("/resources")
      .expect(200);

    expect(getAllSpy).toBeCalledTimes(1);
    expect(body).toStrictEqual(["resource1"]);
  });


Took me all day to figure out I needed to add .prototype to the end of the class in spyOn.
plz fix your extra space from line 5 down, my autism is being triggered
 
TS
TS
Wolf

Wolf

Slow Suicide's No Way To Go
OT Supporter
Mar 23, 2003
116,179
San Jose, CA
plz fix your extra space from line 5 down, my autism is being triggered
:nope:
First 3 lines are setting up the mocks/spys, next 3 are the actual endpoint call, final 2 are the "expected" conditions.
Isolating the actual call helps with readability.
 

Users who are viewing this thread

About Us

  • Please do not post anything that violates any Local, State, Federal or International Laws. Your privacy is protected. You have the right to be forgotten. Site funded by advertising, link monetization and member support.
OT v15.11.2 Copyright © 2000-2022 Offtopic.com
Served by fx.offtopic.com

Online statistics

Members online
445
Guests online
100
Total visitors
545

Forum statistics

Threads
76,194
Messages
7,409,462
Members
87,013
Latest member
jexic84026