CoastalCommitsPastes/server/node_modules/sqlite3/test/json.test.js
2022-03-06 16:46:59 -08:00

22 lines
549 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var sqlite3 = require('..');
if( process.env.NODE_SQLITE3_JSON1 === 'no' ){
describe('json', function() {
it(
'skips JSON tests when --sqlite=/usr (or similar) is tested',
function(){}
);
});
} else {
describe('json', function() {
var db;
before(function(done) {
db = new sqlite3.Database(':memory:', done);
});
it('should select JSON', function(done) {
db.run('SELECT json(?)', JSON.stringify({ok:true}), done);
});
});
}