inversify-express-utils
Version:
Some utilities for the development of express applications with Inversify
20 lines • 864 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const globals_1 = require("@jest/globals");
const jsonContent_1 = require("../../content/jsonContent");
(0, globals_1.describe)('JsonContent', () => {
(0, globals_1.it)('should have application/json as the default media type', () => {
const content = new jsonContent_1.JsonContent({});
(0, globals_1.expect)(content.headers['content-type']).toBe('application/json');
});
(0, globals_1.it)('should respond with the original object', async () => {
const mockObject = {
count: 6,
success: true,
type: 'fake',
};
const content = await new jsonContent_1.JsonContent(mockObject).readAsync();
(0, globals_1.expect)(content).toBe(mockObject);
});
});
//# sourceMappingURL=jsonContent.test.js.map