From 6c110a23ffac3ff58855b76659e5d1a66558a5a7 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 6 Oct 2016 16:26:57 +0200 Subject: [PATCH] Simplify testSelector() function (#25) --- 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}"]`; +}