We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have to test my code with the jest framework. But every time a test is calling stringifyObject with a object its crash with follow exception:
TypeError: get_own_enumerable_property_symbols_1.default.default is not a function or its return value is not iterable
336 | 337 | const obj = { status: 400, data: { code: 400, message: 'Test'} }; > 338 | const log = stringifyObject(obj); | ^
with a simply data type like string or number the test works fine. Here the example code
//util.ts export function traceError() { const obj = { status: 400, data: { code: 400, message: 'Test'} }; const log = stringifyObject(obj); console.log(log); return obj; }
//util.test.ts describe('functions', () => { test('traceError should return 400', () => { const response = traceError(); expect(response.status).toEqual(400); });
Any solution for this?
The text was updated successfully, but these errors were encountered:
You should ask on the Jest issue tracker. This is not an issue with this package.
Sorry, something went wrong.
No branches or pull requests
I have to test my code with the jest framework. But every time a test is calling stringifyObject with a object its crash with follow exception:
TypeError: get_own_enumerable_property_symbols_1.default.default is not a function or its return value is not iterable
with a simply data type like string or number the test works fine. Here the example code
//util.ts
export function traceError() {
const obj = { status: 400, data: { code: 400, message: 'Test'} };
const log = stringifyObject(obj);
console.log(log);
return obj;
}
//util.test.ts
describe('functions', () => {
test('traceError should return 400', () => {
const response = traceError();
expect(response.status).toEqual(400);
});
Any solution for this?
The text was updated successfully, but these errors were encountered: