aboutsummaryrefslogtreecommitdiff
path: root/node_modules/express-validator/test/formatParamOutputTest.js
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-04-16 13:17:06 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-04-16 13:17:06 +0000
commitdc46b87abee1e441c07524ddde67fd902a919336 (patch)
tree13eba08b8655dfd78e9600ec5f612011a0bf3b35 /node_modules/express-validator/test/formatParamOutputTest.js
parent26f4b38e9e5a202756a7c33abc775aea2617aeaf (diff)
added some dependencies to package.json
Diffstat (limited to 'node_modules/express-validator/test/formatParamOutputTest.js')
-rw-r--r--node_modules/express-validator/test/formatParamOutputTest.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/node_modules/express-validator/test/formatParamOutputTest.js b/node_modules/express-validator/test/formatParamOutputTest.js
deleted file mode 100644
index 9d67b5f..0000000
--- a/node_modules/express-validator/test/formatParamOutputTest.js
+++ /dev/null
@@ -1,25 +0,0 @@
-var chai = require('chai');
-var expect = chai.expect;
-var formatParamOutput = require('../index').utils.formatParamOutput;
-
-describe('#formatParamOutput()', function() {
- it('should correct return formatted string if all elements in array are strings', function() {
- expect(formatParamOutput(['hey', 'yo', 'hello'])).to.equal('hey.yo.hello');
- });
-
- it('should return a string with integers in brackets', function() {
- expect(formatParamOutput(['hey', 'yo', '0', 'hello'])).to.equal('hey.yo[0].hello');
- expect(formatParamOutput(['hey', 'yo', 0, 'hello'])).to.equal('hey.yo[0].hello');
- expect(formatParamOutput(['hey', 'yo', 0, 0, 'hello'])).to.equal('hey.yo[0][0].hello');
- expect(formatParamOutput(['hey', 'yo', 2342342, 'hello'])).to.equal('hey.yo[2342342].hello');
- expect(formatParamOutput(['hey', 'yo', '2342342', 'hello'])).to.equal('hey.yo[2342342].hello');
- expect(formatParamOutput(['hey', 'yo', '234ALPHA2342', 'hello'])).to.not.equal('hey.yo[234ALPHA2342].hello');
- expect(formatParamOutput(['hey', 'yo', 'hello', 0])).to.equal('hey.yo.hello[0]');
- expect(formatParamOutput(['hey', 'yo', 'hello', 0, 0])).to.equal('hey.yo.hello[0][0]');
- expect(formatParamOutput(['hey', 'yo', 0, 'hello', 0, 0])).to.equal('hey.yo[0].hello[0][0]');
- });
-
- it('should return the original param if not an array', function() {
- expect(formatParamOutput('yo')).to.equal('yo');
- });
-}); \ No newline at end of file