From 665d3166ed02a3d169f69d3a52cd5fad2996803e Mon Sep 17 00:00:00 2001 From: Paul Betts Date: Mon, 14 Mar 2016 21:00:58 -0700 Subject: [PATCH] Update the tests --- spec/api-native-image-spec.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/spec/api-native-image-spec.js b/spec/api-native-image-spec.js index 587ea876f29a..e411fb110026 100644 --- a/spec/api-native-image-spec.js +++ b/spec/api-native-image-spec.js @@ -40,26 +40,12 @@ describe('nativeImage module', () => { const imagePath = `${path.join(__dirname, 'fixtures', 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`; const image = nativeImage.createFromPath(imagePath); - const nsimage = image.asNativeRepresentation('nsimage'); + const nsimage = image.getNativeHandle(); assert.equal(nsimage.length, 8); // If all bytes are null, that's Bad assert.equal(nsimage.reduce((acc,x) => acc || (x != 0)), true); }); - - it('Throws when asNativeRepresentation gets a bogus value', () => { - const imagePath = `${path.join(__dirname, 'fixtures', 'api')}${path.sep}..${path.sep}${path.join('assets', 'logo.png')}`; - const image = nativeImage.createFromPath(imagePath); - - let shouldDie = true; - try { - image.asNativeRepresentation('__foobar__'); - } catch (e) { - shouldDie = false; - } - - assert.equal(shouldDie, false); - }); }); });