From 6aba4e916a1f2f94a2e255b1ad83316bee00f2eb Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 4 Oct 2016 10:52:02 -0700 Subject: [PATCH] :art: Use deepEqual asserts --- spec/api-native-image-spec.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/spec/api-native-image-spec.js b/spec/api-native-image-spec.js index 763150e812..17112d0c2f 100644 --- a/spec/api-native-image-spec.js +++ b/spec/api-native-image-spec.js @@ -18,24 +18,21 @@ describe('nativeImage module', () => { const imagePath = `.${path.sep}${path.join('spec', 'fixtures', 'assets', 'logo.png')}` const image = nativeImage.createFromPath(imagePath) assert(!image.isEmpty()) - assert.equal(image.getSize().height, 190) - assert.equal(image.getSize().width, 538) + assert.deepEqual(image.getSize(), {width: 538, height: 190}) }) it('loads images from paths with `.` segments', () => { const imagePath = `${path.join(__dirname, 'fixtures')}${path.sep}.${path.sep}${path.join('assets', 'logo.png')}` const image = nativeImage.createFromPath(imagePath) assert(!image.isEmpty()) - assert.equal(image.getSize().height, 190) - assert.equal(image.getSize().width, 538) + assert.deepEqual(image.getSize(), {width: 538, height: 190}) }) it('loads images from paths with `..` segments', () => { const imagePath = `${path.join(__dirname, 'fixtures', 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}` const image = nativeImage.createFromPath(imagePath) assert(!image.isEmpty()) - assert.equal(image.getSize().height, 190) - assert.equal(image.getSize().width, 538) + assert.deepEqual(image.getSize(), {width: 538, height: 190}) }) it('Gets an NSImage pointer on macOS', () => { @@ -57,8 +54,7 @@ describe('nativeImage module', () => { const imagePath = path.join(__dirname, 'fixtures', 'assets', 'icon.ico') const image = nativeImage.createFromPath(imagePath) assert(!image.isEmpty()) - assert.equal(image.getSize().height, 256) - assert.equal(image.getSize().width, 256) + assert.deepEqual(image.getSize(), {width: 256, height: 256}) }) })