From 5f3c6c3952fb74f6133c56406708473a33154480 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 29 Sep 2016 18:41:59 +0200 Subject: [PATCH] Simplify testSelector() function --- test-support/helpers/ember-test-selectors.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/test-support/helpers/ember-test-selectors.js b/test-support/helpers/ember-test-selectors.js index e7bcf39c..a1543fb6 100644 --- a/test-support/helpers/ember-test-selectors.js +++ b/test-support/helpers/ember-test-selectors.js @@ -5,11 +5,5 @@ const { } = Ember; export default function testSelector(key, value) { - let selector; - if (!isNone(value)) { - selector = `[data-test-${key}="${value}"]`; - } else { - selector = `[data-test-${key}]`; - } - return selector; -}; + return isNone(value) ? `[data-test-${key}]` : `[data-test-${key}="${value}"]`; +}