Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3feadb4

Browse files
committed
fix: cache test cases
1 parent3328401 commit3feadb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎test/plugins/test_cache.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('plugin:cache', function() {
1919
{id:0,fid:0,name:'name0',slug:'slug0',starred:false,desc:'<pre></pre>',likes:'1',dislikes:'1',category:'algorithms'},
2020
{id:1,fid:1,name:'name1',slug:'slug1',starred:true,desc:'<pre></pre>',likes:'1',dislikes:'1',category:'algorithms'}
2121
];
22+
constTRANSLATION_CONFIGS={useEndpointTranslation:false};
2223
constPROBLEM={id:0,fid:0,slug:'slug0',category:'algorithms'};
2324

2425
before(function(){
@@ -51,6 +52,7 @@ describe('plugin:cache', function() {
5152
describe('#getProblems',function(){
5253
it('should getProblems w/ cache ok',function(done){
5354
cache.set('problems',PROBLEMS);
55+
cache.set(h.KEYS.translation,TRANSLATION_CONFIGS);
5456

5557
plugin.getProblems(false,function(e,problems){
5658
assert.equal(e,null);
@@ -84,6 +86,7 @@ describe('plugin:cache', function() {
8486
describe('#getProblem',function(){
8587
it('should getProblem w/ cache ok',function(done){
8688
cache.set('problems',PROBLEMS);
89+
cache.set(h.KEYS.translation,TRANSLATION_CONFIGS);
8790
cache.set('0.slug0.algorithms',PROBLEMS[0]);
8891

8992
plugin.getProblem(_.clone(PROBLEM),false,function(e,problem){
@@ -135,6 +138,7 @@ describe('plugin:cache', function() {
135138
describe('#updateProblem',function(){
136139
it('should updateProblem ok',function(done){
137140
cache.set('problems',PROBLEMS);
141+
cache.set(h.KEYS.translation,TRANSLATION_CONFIGS);
138142

139143
constkv={value:'value00'};
140144
constret=plugin.updateProblem(PROBLEMS[0],kv);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp