UNPKG

alasql

Version:

AlaSQL.js - JavaScript SQL database library for relational and graph data manipulation with support of localStorage, IndexedDB, and Excel

37 lines (24 loc) 714 B
if(typeof exports === 'object') { var assert = require("assert"); var alasql = require('..'); } else { __dirname = '.'; }; if(typeof exports == 'object') { describe('Test 262 Leaking of "key" variable to global scope', function() { it('1. Sqllogic', function(done) { mytable = [ { name: 'Hello' }, { name: 'Wolrd' } ]; assert(typeof global.key == 'undefined'); // undefined // To catch if(false) { Object.defineProperty(global, 'key', { get: function(){ assert(false); }, set: function(newValue){ assert(false); } }); } alasql('SELECT * FROM ?', [mytable]); assert(typeof global.key == 'undefined'); // undefined done(); }); }); }