Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("is immutable class", () => {
testImmutableClass(External, [
{
engine: 'mysql',
source: 'diamonds',
attributes: [
{ name: 'time', type: 'TIME' },
{ name: 'color', type: 'STRING' },
{ name: 'cut', type: 'STRING' },
{ name: 'tags', type: 'SET/STRING' }
]
},
{
engine: 'druid',
source: 'moon_child',
timeAttribute: 'time',
attributes: [
it("is immutable class", () => {
testImmutableClass(NumberRange, [
{
start: 0,
end: 0
},
{
start: 1,
end: 1,
bounds: '[]'
},
{
start: 0,
end: 1
},
{
start: 7,
end: 9
it("is immutable class", () => {
testImmutableClass(Set, [
{
setType: 'NULL',
elements: []
},
{
setType: 'NULL',
elements: [null]
},
{
setType: 'BOOLEAN',
elements: [true]
},
{
setType: 'STRING',
elements: []
},
it("is immutable class", () => {
testImmutableClass(Expression, [
{ op: 'literal', value: null },
{ op: 'literal', value: false },
{ op: 'literal', value: true },
{ op: 'literal', value: 0 },
{ op: 'literal', value: 0.1 },
{ op: 'literal', value: 6 },
{ op: 'literal', value: '' },
{ op: 'literal', value: 'Honda' },
{ op: 'literal', value: '$honda' },
{ op: 'literal', value: { setType: 'STRING', elements: [] }, type: 'SET' },
{ op: 'literal', value: { setType: 'STRING', elements: ['BMW', 'Honda', 'Suzuki'] }, type: 'SET' },
{ op: 'literal', value: { setType: 'NUMBER', elements: [0.05, 0.1] }, type: 'SET' },
//{ op: 'literal', value: [{}], type: 'DATASET' },
{ op: 'literal', value: new Date('2015-10-10Z'), type: 'TIME' },
{ op: 'ref', name: 'authors' },
{ op: 'ref', name: 'light_time' },
it("is immutable class", () => {
testImmutableClass(AttributeInfo, [
{ name: 'time', type: 'TIME' },
{ name: 'color', type: 'STRING' },
{ name: 'cut', type: 'STRING' },
{ name: 'cut', type: 'STRING', cardinality: 100 },
{ name: 'cut', type: 'STRING', range: { start: 'A', end: 'F' } },
{ name: 'tags', type: 'SET/STRING' },
{ name: 'carat', type: 'NUMBER', nativeType: 'STRING' },
{ name: 'count', type: 'NUMBER', unsplitable: true, maker: { op: 'count' } },
{
name: 'price',
type: 'NUMBER',
unsplitable: true,
maker: { op: 'sum', expression: { op: 'ref', name: 'price' } }
},
{ name: 'tax', type: 'NUMBER', unsplitable: true },
{ name: 'vendor_id', nativeType: 'hyperUnique', type: "NULL" }
it("is immutable class", () => {
testImmutableClass(Dataset, [
{
attributes: [
{ name: 'x', type: 'NUMBER' },
{ name: 'y', type: 'NUMBER' }
],
data: [
{ x: 1, y: 2 },
{ x: 2, y: 3 }
]
},
{
keys: ['BestCity'],
attributes: [
{ name: 'Void', type: 'NULL' },
{ name: 'SoTrue', type: 'BOOLEAN' },
it("is immutable class", () => {
testImmutableClass(Action, [
{
action: 'filter',
expression: {
op: 'chain',
expression: { op: 'ref', name: 'myVar' },
action: { action: 'is', expression: { op: 'literal', value: 5 } }
}
},
{
action: 'split',
name: 'Page',
expression: { op: 'ref', name: 'page' },
dataName: 'myData'
},
{
action: 'split',
it("is immutable class", () => {
testImmutableClass(TimeRange, [
{
start: new Date('2015-01-26T04:54:10Z'),
end: new Date('2015-01-26T05:54:10Z')
},
{
start: new Date('2015-01-26T04:54:10Z'),
end: new Date('2015-01-26T05:00:00Z')
}
]);
});
it("is an immutable class", () => {
testImmutableClass(Collection, [
CollectionFixtures.testOneOnlyJS(),
CollectionFixtures.testOneTwoJS()
], { context });
});