mirror of
https://github.com/grafana/grafana.git
synced 2025-09-22 13:43:16 +08:00
Chore: Bumps prettier version for new typescript syntax support (#20463)
* Chore: Bumps prettier version for new typescript syntax support * Ran new version of prettier against the codebase
This commit is contained in:
@ -105,7 +105,11 @@ describe('PostgreSQLDatasource', () => {
|
||||
tables: [
|
||||
{
|
||||
columns: [{ text: 'title' }, { text: 'text' }],
|
||||
rows: [['aTitle', 'some text'], ['aTitle2', 'some text2'], ['aTitle3', 'some text3']],
|
||||
rows: [
|
||||
['aTitle', 'some text'],
|
||||
['aTitle2', 'some text2'],
|
||||
['aTitle3', 'some text3'],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -142,7 +146,11 @@ describe('PostgreSQLDatasource', () => {
|
||||
tables: [
|
||||
{
|
||||
columns: [{ text: 'title' }, { text: 'text' }],
|
||||
rows: [['aTitle', 'some text'], ['aTitle2', 'some text2'], ['aTitle3', 'some text3']],
|
||||
rows: [
|
||||
['aTitle', 'some text'],
|
||||
['aTitle2', 'some text2'],
|
||||
['aTitle3', 'some text3'],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -180,7 +188,11 @@ describe('PostgreSQLDatasource', () => {
|
||||
tables: [
|
||||
{
|
||||
columns: [{ text: 'title' }, { text: 'text' }],
|
||||
rows: [['aTitle', 'some text'], ['aTitle2', 'some text2'], ['aTitle3', 'some text3']],
|
||||
rows: [
|
||||
['aTitle', 'some text'],
|
||||
['aTitle2', 'some text2'],
|
||||
['aTitle3', 'some text3'],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -217,7 +229,11 @@ describe('PostgreSQLDatasource', () => {
|
||||
tables: [
|
||||
{
|
||||
columns: [{ text: '__value' }, { text: '__text' }],
|
||||
rows: [['value1', 'aTitle'], ['value2', 'aTitle2'], ['value3', 'aTitle3']],
|
||||
rows: [
|
||||
['value1', 'aTitle'],
|
||||
['value2', 'aTitle2'],
|
||||
['value3', 'aTitle3'],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -255,7 +271,11 @@ describe('PostgreSQLDatasource', () => {
|
||||
tables: [
|
||||
{
|
||||
columns: [{ text: '__text' }, { text: '__value' }],
|
||||
rows: [['aTitle', 'same'], ['aTitle', 'same'], ['aTitle', 'diff']],
|
||||
rows: [
|
||||
['aTitle', 'same'],
|
||||
['aTitle', 'same'],
|
||||
['aTitle', 'diff'],
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -60,7 +60,10 @@ describe('PostgresQuery', () => {
|
||||
|
||||
let column = [{ type: 'column', params: ['value'] }];
|
||||
expect(query.buildValueColumn(column)).toBe('value');
|
||||
column = [{ type: 'column', params: ['value'] }, { type: 'alias', params: ['alias'] }];
|
||||
column = [
|
||||
{ type: 'column', params: ['value'] },
|
||||
{ type: 'alias', params: ['alias'] },
|
||||
];
|
||||
expect(query.buildValueColumn(column)).toBe('value AS "alias"');
|
||||
column = [
|
||||
{ type: 'column', params: ['v'] },
|
||||
@ -86,7 +89,10 @@ describe('PostgresQuery', () => {
|
||||
|
||||
let column = [{ type: 'column', params: ['value'] }];
|
||||
expect(query.buildValueColumn(column)).toBe('value');
|
||||
column = [{ type: 'column', params: ['value'] }, { type: 'alias', params: ['alias'] }];
|
||||
column = [
|
||||
{ type: 'column', params: ['value'] },
|
||||
{ type: 'alias', params: ['alias'] },
|
||||
];
|
||||
expect(query.buildValueColumn(column)).toBe('value AS "alias"');
|
||||
column = [
|
||||
{ type: 'column', params: ['v'] },
|
||||
@ -129,7 +135,10 @@ describe('PostgresQuery', () => {
|
||||
query.target.where = [{ type: 'expression', params: ['v', '=', '1'] }];
|
||||
expect(query.buildWhereClause()).toBe('\nWHERE\n v = 1');
|
||||
|
||||
query.target.where = [{ type: 'macro', name: '$__timeFilter' }, { type: 'expression', params: ['v', '=', '1'] }];
|
||||
query.target.where = [
|
||||
{ type: 'macro', name: '$__timeFilter' },
|
||||
{ type: 'expression', params: ['v', '=', '1'] },
|
||||
];
|
||||
expect(query.buildWhereClause()).toBe('\nWHERE\n $__timeFilter(t) AND\n v = 1');
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user