()
| 36 | } |
| 37 | |
| 38 | function testProduceConsume() { |
| 39 | const source = getSource('original'); |
| 40 | |
| 41 | const data = produce(source); |
| 42 | |
| 43 | for (const cachedData of common.getArrayBufferViews(data)) { |
| 44 | // It should consume code cache |
| 45 | const script = new vm.Script(source, { |
| 46 | cachedData |
| 47 | }); |
| 48 | assert(!script.cachedDataRejected); |
| 49 | assert.strictEqual(script.runInThisContext()(), 'original'); |
| 50 | } |
| 51 | } |
| 52 | testProduceConsume(); |
| 53 | |
| 54 | function testProduceMultiple() { |
no test coverage detected