So what is happening with SuiteCloud Unit Testing ...
# sdf
k
So what is happening with SuiteCloud Unit Testing then?? My Issue for NS to add the stubs like N/format has been closed in github. Has anyone actually figured out how to mock N/format module successfully taking into account the user/company preferences?
b
this sounds like a strange question
you dont want to make a mock act like the real thing
you just need to make it return a predictable value that you can make assertions against
k
Not when dates are acting odd compared to in account
b
your unit testing isnt supposed to care how your netsuite account behaves
its literally you giving your functions test inputs and asserting that they have the expected output values
for example, valid unit test can assert that creating a record returns negative internal ids
k
I’m aware. My output is a large object which contains manipulated dates using formats
Using unit testing to compare complex calculations against test data we export from account Custom records
b
its basically up to you to make sure that your assertions and the return values of mocks are actually what you want
k
Would just be nice for a way to make an assumption of the server time/ user pref