File: fix-test-for-lru-cache-7.patch

package info (click to toggle)
node-ejs 3.1.10%2B~3.1.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,144 kB
  • sloc: javascript: 2,476; makefile: 5
file content (41 lines) | stat: -rw-r--r-- 1,150 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
35
36
37
38
39
40
41
From: Xavier Guimard <yadd@debian.org>
Date: Tue, 6 Aug 2024 18:48:09 +0000
Subject: =?utf-8?q?fix_test_for_lru-cache_=E2=89=A5_5?=

Forwarded: no
Last-Update: 2020-05-14
---
 test/ejs.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/ejs.js b/test/ejs.js
index 607b4a7..46b6a49 100755
--- a/test/ejs.js
+++ b/test/ejs.js
@@ -358,7 +358,7 @@ suite('ejs.render(str, data, opts)', function () {
     var expected = '<p>Old</p>';
 
     // Switch to LRU
-    ejs.cache = LRU();
+    ejs.cache = new LRU({max: 500});
 
     out = ejs.render('<p>Old</p>', {}, options);
     assert.equal(out, expected);
@@ -607,7 +607,7 @@ suite('cache specific', function () {
     var options = {cache: true, filename: file};
     var out;
 
-    ejs.cache = LRU();
+    ejs.cache = new LRU({max: 500});
 
     out = ejs.render('<p>Old</p>', {}, options);
     assert.equal(out, expected);
@@ -626,7 +626,7 @@ suite('cache specific', function () {
     var expected;
     var file;
 
-    ejs.cache = LRU(1);
+    ejs.cache = new LRU({max: 1});
 
     file = __dirname + '/tmp/render1.ejs';
     options = {cache: true, filename: file};