@contrail/types
Advanced tools
Comparing version 2.0.7 to 2.0.8
@@ -15,3 +15,3 @@ "use strict"; | ||
const val = objValFormatter.formatValue('Black', type_properties_1.PropertyType.String); | ||
expect(val).toEqual("Black"); | ||
expect(val).toEqual('Black'); | ||
}); | ||
@@ -26,6 +26,6 @@ it('USD format currency values (wholesale)', () => { | ||
const data = { | ||
'USD': 54 | ||
USD: 54, | ||
}; | ||
const val = objValFormatter.formatValue(data, type_properties_1.PropertyType.Currency); | ||
expect(val).toEqual("$54.00"); | ||
expect(val).toEqual('$54.00'); | ||
}); | ||
@@ -40,6 +40,6 @@ it('Handle string value for number', () => { | ||
const data = { | ||
'USD': "54" | ||
USD: '54' | ||
}; | ||
const val = objValFormatter.formatValue(data, type_properties_1.PropertyType.Currency); | ||
expect(val).toEqual("$54.00"); | ||
expect(val).toEqual('$54.00'); | ||
}); | ||
@@ -54,3 +54,3 @@ it('USD format currency values', () => { | ||
const val = objValFormatter.formatValue(45, type_properties_1.PropertyType.Currency); | ||
expect(val).toEqual("$45.00"); | ||
expect(val).toEqual('$45.00'); | ||
}); | ||
@@ -74,3 +74,3 @@ it('Germany format currency values', () => { | ||
const val = objValFormatter.formatValue(75, type_properties_1.PropertyType.Currency); | ||
expect(val).toEqual("¥75"); | ||
expect(val).toEqual('¥75'); | ||
}); | ||
@@ -85,3 +85,3 @@ it('Japanese format currency values (with decimal - override)', () => { | ||
const val = objValFormatter.formatValue(75, type_properties_1.PropertyType.Currency, { format: type_properties_1.NumberFormat.Currency, precision: 2 }); | ||
expect(val).toEqual("¥75.00"); | ||
expect(val).toEqual('¥75.00'); | ||
}); | ||
@@ -96,5 +96,5 @@ it('Japanese Decimal format', () => { | ||
let val = objValFormatter.formatValue(7500, type_properties_1.PropertyType.Number, { format: type_properties_1.NumberFormat.Decimal, precision: 2 }); | ||
expect(val).toEqual("7,500.00"); | ||
expect(val).toEqual('7,500.00'); | ||
val = objValFormatter.formatValue(7500, type_properties_1.PropertyType.Number, { format: type_properties_1.NumberFormat.Decimal, precision: 0 }); | ||
expect(val).toEqual("7,500"); | ||
expect(val).toEqual('7,500'); | ||
}); | ||
@@ -108,4 +108,4 @@ it('Percentage format', () => { | ||
objValFormatter.setLocalConfig(localizationConfig); | ||
let val = objValFormatter.formatValue(.45, type_properties_1.PropertyType.Percent, { format: type_properties_1.NumberFormat.Percent, precision: 0 }); | ||
expect(val).toEqual("45%"); | ||
const val = objValFormatter.formatValue(.45, type_properties_1.PropertyType.Percent, { format: type_properties_1.NumberFormat.Percent, precision: 0 }); | ||
expect(val).toEqual('45%'); | ||
}); | ||
@@ -115,3 +115,3 @@ it('Format Boolean value (true)', () => { | ||
const val = objValFormatter.formatBoolean(true); | ||
expect(val).toEqual("Yes"); | ||
expect(val).toEqual('Yes'); | ||
}); | ||
@@ -121,4 +121,4 @@ it('Format Boolean value (false)', () => { | ||
const val = objValFormatter.formatBoolean(false); | ||
expect(val).toEqual("No"); | ||
expect(val).toEqual('No'); | ||
}); | ||
}); |
{ | ||
"name": "@contrail/types", | ||
"version": "2.0.7", | ||
"version": "2.0.8", | ||
"description": "Types Utility module", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
29863