Skip to content

Commit

Permalink
pr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemann committed Jan 12, 2024
1 parent 6b95dc4 commit 1980451
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions property_tests/arbitraries/canister_arb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { InitMethod } from './canister_methods/init_method_arb';
import { CorrespondingJSType } from './candid/corresponding_js_type';
import { TextClass, FloatClass } from '@dfinity/candid/lib/cjs/idl';

TextClass.prototype.valueToString = function (x): string {
TextClass.prototype.valueToString = (x): string => {
return `"${escapeForBash(x)}"`;
};

/**
* If a float doesn't have a decimal it won't serialize properly, so 10 while
* is a float won't serialize unless it's 10.0
*/
FloatClass.prototype.valueToString = function (x): string {
FloatClass.prototype.valueToString = (x): string => {
const floatString = x.toString();
if (floatString.includes('.')) {
return floatString;
Expand Down

0 comments on commit 1980451

Please sign in to comment.