MCPcopy Index your code
hub / github.com/brianc/node-postgres / testIdent

Function testIdent

packages/pg/test/unit/client/escape-tests.js:27–43  ·  view source on GitHub ↗
(testName, input, expected)

Source from the content-addressed store, hash-verified

25}
26
27const testIdent = function (testName, input, expected) {
28 test(testName, function () {
29 const client = new Client(helper.config)
30 const actual = client.escapeIdentifier(input)
31 assert.equal(expected, actual)
32 })
33
34 test('Client.prototype.' + testName, function () {
35 const actual = Client.prototype.escapeIdentifier(input)
36 assert.equal(expected, actual)
37 })
38
39 test('utils.' + testName, function () {
40 const actual = utils.escapeIdentifier(input)
41 assert.equal(expected, actual)
42 })
43}
44
45testLit('escapeLiteral: no special characters', 'hello world', "'hello world'")
46

Callers 1

escape-tests.jsFile · 0.85

Calls 2

escapeIdentifierMethod · 0.95
testFunction · 0.85

Tested by

no test coverage detected