我正在将 RMarkdown 中的报告开发为 PDF。
我正在使用以下代码生成 2 个表:
test('should call signup when its valid form', () => {
const mockGetFullYear = jest.fn(() => '2021');
(global.Date as any) = jest.fn(() => ({ getFullYear: mockGetFullYear }));
jest.spyOn(routerMock, 'navigate');
signupServiceMock.signup.mockReturnValue(of(null));
const type = 'NIF';
const document = '12345678A';
const birthday = '01-01-2021';
const email = 'test001@hotmail.com';
const repeatEmail = 'test001@hotmail.com';
const checkbox = true;
signupFormComponent.ngOnInit();
signupFormComponent.form.setValue({
type,
document,
birthday,
email,
repeatEmail,
checkbox
});
signupFormComponent.signup();
expect(signupServiceMock.signup).toHaveBeenCalledWith(email, document, type, birthday);
expect(routerMock.navigate).toHaveBeenCalledWith(['signup/thanks']);
});
我想在同一页面上并排放置 2 个表。
有人知道如何做到这一点吗?
谢谢,
迈克尔