UNPKG

@sutton-signwriting/core

Version:

a javascript package for node and browsers that supports general processing of the Sutton SignWriting script

37 lines (30 loc) 773 B
import { merge } from './style-merge'; it('should merge style object', () => { expect(merge({'colorize': true},{zoom:2})).toEqual({ 'colorize': true, 'zoom': 2 }); }) it('should merge style zoom of x', () => { expect(merge({'colorize': true},{zoom:'x'})).toEqual({ 'colorize': true, 'zoom': 1 }); }) it('should merge style zoom of x', () => { expect(merge({'colorize': true, 'zoom': 2},{'zoom':'x'})).toEqual({ 'colorize': true, 'zoom': 2 }); }) it('should merge without breaking on bad data', () => { expect(merge()).toEqual({ 'zoom': 1 }); expect(merge(undefined)).toEqual({ 'zoom': 1 }); expect(merge("S10000500x500-CZ5")).toEqual({ 'zoom': 1 }); })