2020-03-05 20:57:24 +00:00
|
|
|
import configSerializer from './config-serializer';
|
2017-06-22 07:03:36 +00:00
|
|
|
|
2021-08-18 05:46:56 +00:00
|
|
|
describe('logger/config-serializer', () => {
|
2017-07-02 04:28:43 +00:00
|
|
|
it('squashes templates', () => {
|
|
|
|
const config = {
|
|
|
|
nottoken: 'b',
|
|
|
|
prBody: 'foo',
|
|
|
|
};
|
2021-08-11 17:42:52 +00:00
|
|
|
expect(configSerializer(config)).toMatchSnapshot({
|
|
|
|
prBody: '[Template]',
|
|
|
|
});
|
2017-07-02 04:28:43 +00:00
|
|
|
});
|
2022-04-12 14:49:49 +00:00
|
|
|
|
2017-08-08 04:25:44 +00:00
|
|
|
it('suppresses content', () => {
|
|
|
|
const config = {
|
|
|
|
content: {},
|
|
|
|
};
|
2021-08-11 17:42:52 +00:00
|
|
|
expect(configSerializer(config)).toMatchSnapshot({
|
|
|
|
content: '[content]',
|
|
|
|
});
|
2017-08-08 04:25:44 +00:00
|
|
|
});
|
2017-06-22 07:03:36 +00:00
|
|
|
});
|