File: fix-test-for-lru-cache-5.diff

package info (click to toggle)
node-ejs 2.5.7-3%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 796 kB
  • sloc: javascript: 1,608; makefile: 2
file content (34 lines) | stat: -rw-r--r-- 800 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Description: fix test for lru-cache ≥ 5
Author: Xavier Guimard <yadd@debian.org>
Forwarded: no
Last-Update: 2020-05-14

--- a/test/ejs.js
+++ b/test/ejs.js
@@ -272,7 +272,7 @@
     var expected = '<p>Old</p>';
 
     // Switch to LRU
-    ejs.cache = LRU();
+    ejs.cache = new LRU();
 
     out = ejs.render('<p>Old</p>', {}, options);
     assert.equal(out, expected);
@@ -512,7 +512,7 @@
     var options = {cache: true, filename: file};
     var out;
 
-    ejs.cache = LRU();
+    ejs.cache = new LRU();
 
     out = ejs.render('<p>Old</p>', {}, options);
     assert.equal(out, expected);
@@ -531,7 +531,7 @@
     var expected;
     var file;
 
-    ejs.cache = LRU(1);
+    ejs.cache = new LRU(1);
 
     file = __dirname + '/tmp/render1.ejs';
     options = {cache: true, filename: file};