Skip to content

Commit

Permalink
Change defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
greguz committed Jun 11, 2020
1 parent 62d36ba commit d28707d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fluente.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ module.exports = function fluente (options) {
historySize: parseNumber(options.historySize, 10),
isMutable: options.isMutable === true,
skipLocking: options.skipLocking === true,
hardBinding: options.hardBinding !== false,
hardBinding: options.hardBinding === true,
isLocked: false,
past: [],
present: options.state || {},
Expand Down
10 changes: 8 additions & 2 deletions fluente.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,14 @@ test('binding', t => {
unwrap
}
})
a = a.next.call(null)
t.is(a.unwrap.call(null), 1)
t.throws(
() => a.next.call(null),
{ code: 'FLUENTE_UNBOUND' }
)
t.throws(
() => a.unwrap.call(null),
{ code: 'FLUENTE_UNBOUND' }
)

let b = fluente({
hardBinding: true,
Expand Down

0 comments on commit d28707d

Please sign in to comment.