(name: string, script: string)
| 328 | |
| 329 | describe('Attribute', () => { |
| 330 | const getAttr = async (name: string, script: string): Promise<Value['attr']> => { |
| 331 | const parser = new Parser(); |
| 332 | const interpreter = new Interpreter({}); |
| 333 | const ast = parser.parse(script); |
| 334 | await interpreter.exec(ast); |
| 335 | const value = interpreter.scope.get(name); |
| 336 | return value.attr; |
| 337 | }; |
| 338 | |
| 339 | test.concurrent('no attribute', async () => { |
| 340 | const attr = await getAttr('f', ` |
no test coverage detected