Преглед изворни кода

Add templateSrv to PostgresQuery tests

Sven Klemm пре 7 година
родитељ
комит
d0c2b19c51
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      public/app/plugins/datasource/postgres/specs/postgres_query.jest.ts

+ 4 - 0
public/app/plugins/datasource/postgres/specs/postgres_query.jest.ts

@@ -1,6 +1,10 @@
 import PostgresQuery from '../postgres_query';
 
 describe('PostgresQuery', function() {
+  let templateSrv = {
+    replace: jest.fn(text => text),
+  };
+
   describe('When initializing', function() {
     it('should not be in SQL mode', function() {
       let query = new PostgresQuery({}, templateSrv);