diff --git a/src/reverse_translator.test.ts b/src/reverse_translator.test.ts new file mode 100644 index 0000000..d40c6c2 --- /dev/null +++ b/src/reverse_translator.test.ts @@ -0,0 +1,12 @@ +import { JsonTemplateEngine } from './engine'; + +describe('reverse_translator', () => { + it('should reverse translate with indentation', () => { + const template = JsonTemplateEngine.reverseTranslate( + JsonTemplateEngine.parse(`{a: {b: {c: 1}}}`), + ); + expect(template).toEqual( + '{\n "a": {\n "b": {\n "c": 1\n }\n }\n}', + ); + }); +});