Skip to content

Commit

Permalink
add test & change message
Browse files Browse the repository at this point in the history
  • Loading branch information
jitsedesmet committed Oct 20, 2023
1 parent caf28ce commit 406fe3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
ActorQueryOperation, ActorQueryOperationTypedMediated,
} from '@comunica/bus-query-operation';
import type { IActorTest } from '@comunica/core';
import type { ExpressionError } from '@comunica/expression-evaluator';
import { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';
import type { Bindings, IActionContext, IQueryOperationResult, IQueryOperationResultBindings } from '@comunica/types';
import type { Algebra } from 'sparqlalgebrajs';
Expand Down Expand Up @@ -54,7 +55,8 @@ export class ActorQueryOperationExtend extends ActorQueryOperationTypedMediated<
// Errors silently don't actually extend according to the spec
push(bindings);
// But let's warn anyway
this.logWarn(context, `Expression error for extend operation (${error.message}) with bindings '${bindingsToString(bindings)}'`);
this.logWarn(context, `Expression error for extend operation (${(<ExpressionError> error).message})` +
`with bindings '${bindingsToString(bindings)}'`);
} else {
bindingsStream.emit('error', error);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dateTyped, int } from '../../util/Aliases';
import { dateTimeTyped, dateTyped, int } from '../../util/Aliases';
import { Notation } from '../../util/TestTable';
import { runTestTable } from '../../util/utils';

Expand All @@ -12,6 +12,7 @@ describe('evaluation of \'YEAR\'', () => {
'${dateTyped('2010-12-21-08:00')}' = '${int('2010')}'
'${dateTyped('2008-06-20Z')}' = '${int('2008')}'
'${dateTyped('2011-02-01')}' = '${int('2011')}'
'${dateTimeTyped('1954-01-01T00:00:00Z')}' = '${int('1954')}'
`,
});
});

0 comments on commit 406fe3b

Please sign in to comment.