@datagrok/api-tests
Advanced tools
Comparing version 1.7.7 to 1.7.8
{ | ||
"name": "@datagrok/api-tests", | ||
"friendlyName": "API Tests", | ||
"version": "1.7.7", | ||
"version": "1.7.8", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Anna Muzychyna", |
@@ -12,3 +12,3 @@ import './date-functions'; | ||
category('Functions: General', () => { | ||
test('Eval', async () => { | ||
test('eval', async () => { | ||
const dfList: DG.DataFrame[] = await grok.functions | ||
@@ -19,3 +19,3 @@ .eval('OpenServerFile("System:AppData/ApiTests/datasets/demog.csv")'); | ||
test('Call', async () => { | ||
test('call', async () => { | ||
const dfList: DG.DataFrame[] = await grok.functions | ||
@@ -26,5 +26,25 @@ .call('OpenServerFile', {'fullPath': 'System:AppData/ApiTests/datasets/demog.csv'}); | ||
test('Def param', async () => { | ||
test('def param', async () => { | ||
await grok.functions.call('AddNewColumn', {table: grok.data.demo.demog(), expression: 'test', name: 'test'}); | ||
}); | ||
// GROK-13478 | ||
test('call params', async () => { | ||
expect(await grok.functions.call('sin', {y: 0.5}), null, '{y: 0.5}'); | ||
expect(await grok.functions.call('sin', {x: 0.5}), 0.479425538604203, '{x: 0.5}'); | ||
expect(await grok.functions.call('sin', {X: 0.5}), 0.479425538604203, '{X: 0.5}'); | ||
}); | ||
test('query params', async () => { | ||
// expect(await grok.data.query('ApiTests:dummyPackageQuery', {y: 0.5}), null, '{y: 0.5}'); | ||
expect((await grok.data.query('ApiTests:dummyPackageQuery', {x: 0.5})).get('res', 0), 0.5, '{x: 0.5}'); | ||
expect((await grok.data.query('ApiTests:dummyPackageQuery', {X: 0.5})).get('res', 0), 0.5, '{X: 0.5}'); | ||
}); | ||
test('Outputs conversion', async () => { | ||
const out = await grok.functions.call('ApiTests:DummyPython'); | ||
expect(out.df1 instanceof DG.DataFrame, true); // works with DG.toJs(out.df1) | ||
expect(out.df2 instanceof DG.DataFrame, true); // works with DG.toJs(out.df2) | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1353758
80
3608