tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

callexpression-templateliteral.js (692B)


      1 // Copyright (C) 2018 Leo Balter. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 description: >
      5    ImportCall is a CallExpression and can be used before a template literal
      6 esid: prod-ImportCall
      7 info: |
      8  CallExpression:
      9    ImportCall
     10    CallExpression TemplateLiteral
     11    CallExpression Arguments
     12 features: [dynamic-import]
     13 ---*/
     14 
     15 // valid syntax, but fails on runtime evaluation
     16 
     17 assert.throws(TypeError, () => {
     18    import('./empty_FIXTURE.js')``;
     19 });
     20 
     21 assert.throws(TypeError, () => {
     22    import('./empty_FIXTURE.js')`something`;
     23 });
     24 
     25 assert.throws(TypeError, () => {
     26    import('./empty_FIXTURE.js')`${42}`;
     27 });
     28 
     29 reportCompare(0, 0);