mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
add test for not escaping characters in pyconfig (#929)
This commit is contained in:
@@ -156,4 +156,10 @@ describe('loadConfigFromElement', () => {
|
||||
expect(()=>loadConfigFromElement(el)).toThrow(UserError);
|
||||
});
|
||||
|
||||
it('should not escape characters like &', () => {
|
||||
const el = make_config_element({ type: 'json'});
|
||||
el.innerHTML = JSON.stringify({ fetch: [{from: 'https://datausa.io/api/data?drilldowns=Nation&measures=Population'}]});
|
||||
const config = loadConfigFromElement(el);
|
||||
expect(config.fetch[0].from).toBe('https://datausa.io/api/data?drilldowns=Nation&measures=Population');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user