File tree Expand file tree Collapse file tree 3 files changed +34
-5
lines changed
packages/optimizely-sdk/lib Expand file tree Collapse file tree 3 files changed +34
-5
lines changed Original file line number Diff line number Diff line change @@ -104,11 +104,11 @@ describe('javascript-sdk/react-native', function() {
104104 } ) ;
105105 // Invalid datafile causes onReady Promise rejection - catch this error
106106 optlyInstance . onReady ( ) . catch ( function ( ) { } ) ;
107- assert . equal ( 'react-native-js' , optlyInstance . clientEngine ) ;
107+ assert . equal ( 'react-native-js-sdk ' , optlyInstance . clientEngine ) ;
108108 assert . equal ( packageJSON . version , optlyInstance . clientVersion ) ;
109109 } ) ;
110110
111- it ( 'should allow passing of "react-sdk" as the clientEngine and convert it to "react-native"' , function ( ) {
111+ it ( 'should allow passing of "react-sdk" as the clientEngine and convert it to "react-native-sdk "' , function ( ) {
112112 var optlyInstance = optimizelyFactory . createInstance ( {
113113 clientEngine : 'react-sdk' ,
114114 datafile : { } ,
@@ -118,7 +118,7 @@ describe('javascript-sdk/react-native', function() {
118118 } ) ;
119119 // Invalid datafile causes onReady Promise rejection - catch this error
120120 optlyInstance . onReady ( ) . catch ( function ( ) { } ) ;
121- assert . equal ( 'react-native' , optlyInstance . clientEngine ) ;
121+ assert . equal ( 'react-native-sdk ' , optlyInstance . clientEngine ) ;
122122 } ) ;
123123
124124 it ( 'should activate with provided event dispatcher' , function ( ) {
Original file line number Diff line number Diff line change @@ -174,8 +174,8 @@ exports.CONTROL_ATTRIBUTES = {
174174exports . JAVASCRIPT_CLIENT_ENGINE = 'javascript-sdk' ;
175175exports . NODE_CLIENT_ENGINE = 'node-sdk' ;
176176exports . REACT_CLIENT_ENGINE = 'react-sdk' ;
177- exports . REACT_NATIVE_CLIENT_ENGINE = 'react-native' ;
178- exports . REACT_NATIVE_JS_CLIENT_ENGINE = 'react-native-js' ;
177+ exports . REACT_NATIVE_CLIENT_ENGINE = 'react-native-sdk ' ;
178+ exports . REACT_NATIVE_JS_CLIENT_ENGINE = 'react-native-js-sdk ' ;
179179exports . NODE_CLIENT_VERSION = '3.6.0-alpha.1' ;
180180
181181exports . VALID_CLIENT_ENGINES = [
Original file line number Diff line number Diff line change 1+ /****************************************************************************
2+ * Copyright 2020, Optimizely, Inc. and contributors *
3+ * *
4+ * Licensed under the Apache License, Version 2.0 (the "License"); *
5+ * you may not use this file except in compliance with the License. *
6+ * You may obtain a copy of the License at *
7+ * *
8+ * http://www.apache.org/licenses/LICENSE-2.0 *
9+ * *
10+ * Unless required by applicable law or agreed to in writing, software *
11+ * distributed under the License is distributed on an "AS IS" BASIS, *
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13+ * See the License for the specific language governing permissions and *
14+ * limitations under the License. *
15+ ***************************************************************************/
16+
17+ var chai = require ( 'chai' )
18+ var enums = require ( './' )
19+ var assert = chai . assert ;
20+
21+ describe ( 'lib/utils/enums' , function ( ) {
22+ describe ( 'valid client engines' , function ( ) {
23+ it ( 'all valid client engines should end with "-sdk"' , function ( ) {
24+ enums . VALID_CLIENT_ENGINES . forEach ( function ( clientEngine ) {
25+ assert . isTrue ( clientEngine . endsWith ( '-sdk' ) )
26+ } ) ;
27+ } ) ;
28+ } ) ;
29+ } ) ;
You can’t perform that action at this time.
0 commit comments