Skip to content

Commit

Permalink
fix lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vitPinchuk committed Feb 2, 2024
1 parent 861312e commit fdf1431
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/maps.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ describe('Maps', () => {

loadBaidu({ key, callback });

expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(MAP_API.baidu),
})
);
expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(key),
})
);
expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(callback),
})
Expand All @@ -43,7 +43,7 @@ describe('Maps', () => {
it('Should not re-initialize files twice', () => {
(window as any).BMap = true;
loadBaidu({} as any);
expect(document.body.appendChild).not.toBeCalled();
expect(document.body.appendChild).not.toHaveBeenCalled();
delete (window as any).BMap;
});
});
Expand All @@ -58,17 +58,17 @@ describe('Maps', () => {

loadGaode({ key, plugin });

expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(MAP_API.gaode),
})
);
expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(key),
})
);
expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(plugin),
})
Expand All @@ -78,7 +78,7 @@ describe('Maps', () => {
it('Should not re-initialize files twice', () => {
(window as any).AMap = true;
loadGaode({} as any);
expect(document.body.appendChild).not.toBeCalled();
expect(document.body.appendChild).not.toHaveBeenCalled();
delete (window as any).AMap;
});
});
Expand All @@ -93,17 +93,17 @@ describe('Maps', () => {

loadGoogle({ key, callback });

expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(MAP_API.google),
})
);
expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(key),
})
);
expect(document.body.appendChild).toBeCalledWith(
expect(document.body.appendChild).toHaveBeenCalledWith(
expect.objectContaining({
src: expect.stringContaining(callback),
})
Expand All @@ -115,7 +115,7 @@ describe('Maps', () => {
maps: {},
};
loadGoogle({} as any);
expect(document.body.appendChild).not.toBeCalled();
expect(document.body.appendChild).not.toHaveBeenCalled();
delete (window as any).google;
});
});
Expand Down

0 comments on commit fdf1431

Please sign in to comment.