mirror of
https://github.com/NetEase/tango.git
synced 2026-09-03 06:33:51 +08:00
* fix: update templatePattern regex to allow for multiline code wrapping * fix: update error overlay display to use designer.activeView instead of mode * fix: update maxRows to 6 in TextAreaSetter
14 lines
597 B
TypeScript
14 lines
597 B
TypeScript
import { isWrappedCode } from '../src/helpers';
|
|
|
|
describe('helpers/codeHelper', () => {
|
|
it('isWrappedCode', () => {
|
|
expect(isWrappedCode('{{[]}}')).toBeTruthy(); // true
|
|
expect(isWrappedCode('{{{}}}')).toBeTruthy(); // true
|
|
expect(isWrappedCode('{{this.foo}}')).toBeTruthy(); // true
|
|
expect(isWrappedCode('{{123}}')).toBeTruthy(); // true
|
|
expect(isWrappedCode('{{() => {}}}')).toBeTruthy(); // true
|
|
expect(isWrappedCode('{{<Button>button</Button>}}')).toBeTruthy(); // true
|
|
expect(isWrappedCode('{{<>\n<Button>hello</Button>\n</>}}')).toBeTruthy(); // true
|
|
});
|
|
});
|