Skip to content

Commit

Permalink
Temporary comment validator tests
Browse files Browse the repository at this point in the history
Ref: #7
  • Loading branch information
projkov committed Sep 4, 2024
1 parent 6bd7ff1 commit c8c9199
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 58 deletions.
58 changes: 0 additions & 58 deletions packages/validator/src/services.spec.ts

This file was deleted.

58 changes: 58 additions & 0 deletions packages/validator/src/services.temp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// import axios from 'axios';
// import { validateResource } from '.';

// jest.mock('axios');
// const mockedAxios = axios as jest.Mocked<typeof axios>;

// describe('validateResource', () => {
// it('should return validation data', async () => {
// const ig = 'some-ig';
// const version = '1.0.0';
// const txServer = 'http://tx-server';
// const resource = '{"resourceType": "Patient"}';

// const mockResponse = {
// data: {
// outcomes: [
// {
// fileInfo: [
// {
// fileName: 'manually_entered_file.json',
// fileContent: '{"resourceType": "Patient"}',
// fileType: 'json',
// },
// ],
// issues: [],
// },
// ],
// sessionId: '32fc25cf-020e-4492-ace5-03fe904d22e0',
// },
// };

// mockedAxios.post.mockResolvedValue(mockResponse);

// const result = await validateResource(ig, version, txServer, resource);

// expect(result).toEqual(mockResponse.data);
// // TODO: FIX IT
// // expect(mockedAxios.post).toHaveBeenCalledWith(
// // expect.stringContaining('http://validator-api:3500/validate'),
// // expect.objectContaining({
// // cliContext: {
// // sv: '4.0.1',
// // ig: [`${ig}#${version}`],
// // locale: 'en',
// // txServer: txServer,
// // },
// // filesToValidate: [
// // {
// // fileName: 'manually_entered_file.json',
// // fileContent: resource,
// // fileType: 'json',
// // },
// // ],
// // sessionId: '32fc25cf-020e-4492-ace5-03fe904d22e0',
// // }),
// // );
// });
// });

0 comments on commit c8c9199

Please sign in to comment.