new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vitest · Config reference · all subjects

config/chaiconfig

4 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

chaiConfig option type and default

The chaiConfig option has type { includeStack?, showDiff?, truncateThreshold? } with default value { includeStack: false, showDiff: true, truncateThreshold: 40 }.

chaiConfig.includeStack option

chaiConfig.includeStack is a boolean option with default false. It influences whether stack trace is included in Assertion error message. The default of false suppresses stack trace in the error message.

chaiConfig.showDiff option

chaiConfig.showDiff is a boolean option with default true. It influences whether or not the showDiff flag should be included in the thrown AssertionErrors. Setting it to false will always be false; setting it to true will be true when the assertion has requested a diff to be shown.

chaiConfig.truncateThreshold option

chaiConfig.truncateThreshold is a number option with default 40. It sets length threshold for actual and expected values in assertion error messages. If this threshold is exceeded, for example for large data structures, the value is replaced with something like [ Array(3) ] or { Object (prop1, prop2) }. Setting it to 0 disables truncating altogether.

Give your agent this brain