@seleniumhq/code-export-javascript-mocha 3.17.0 → 3.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,53 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- // Licensed to the Software Freedom Conservancy (SFC) under one
7
- // or more contributor license agreements. See the NOTICE file
8
- // distributed with this work for additional information
9
- // regarding copyright ownership. The SFC licenses this file
10
- // to you under the Apache License, Version 2.0 (the
11
- // "License"); you may not use this file except in compliance
12
- // with the License. You may obtain a copy of the License at
13
- //
14
- // http://www.apache.org/licenses/LICENSE-2.0
15
- //
16
- // Unless required by applicable law or agreed to in writing,
17
- // software distributed under the License is distributed on an
18
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- // KIND, either express or implied. See the License for the
20
- // specific language governing permissions and limitations
21
- // under the License.
22
-
23
- let hooks = [];
24
-
25
- function register(name, commands) {
26
- let result = '';
27
- result += `
28
- public void ${name}() {
29
- `;
30
- if (commands) {
31
- commands.forEach(command => {
32
- result += `\t${command}
33
- `;
34
- });
35
- }
36
- result += `}`;
37
- if (!hooks.includes(result)) hooks.push(result);
38
- }
39
-
40
- function clear() {
41
- hooks = [];
42
- }
43
-
44
- function emit({ isOptional } = { isOptional: false }) {
45
- if (isOptional && !hooks.length) return '';
46
- return hooks.length ? hooks.join('\n\r') : '';
47
- }
48
-
49
- exports.default = {
50
- register,
51
- clear,
52
- emit
53
- };
@@ -1,48 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- // Licensed to the Software Freedom Conservancy (SFC) under one
7
- // or more contributor license agreements. See the NOTICE file
8
- // distributed with this work for additional information
9
- // regarding copyright ownership. The SFC licenses this file
10
- // to you under the Apache License, Version 2.0 (the
11
- // "License"); you may not use this file except in compliance
12
- // with the License. You may obtain a copy of the License at
13
- //
14
- // http://www.apache.org/licenses/LICENSE-2.0
15
- //
16
- // Unless required by applicable law or agreed to in writing,
17
- // software distributed under the License is distributed on an
18
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- // KIND, either express or implied. See the License for the
20
- // specific language governing permissions and limitations
21
- // under the License.
22
-
23
- let variables = `
24
- private WebDriver driver;
25
- private HashMap<String, Object> vars = new HashMap<String, Object>();
26
- JavascriptExecutor js;
27
- `;
28
-
29
- let hooks = [];
30
-
31
- function register(statement) {
32
- hooks.push(statement);
33
- }
34
-
35
- function clear() {
36
- hooks = [];
37
- }
38
-
39
- function emit({ isOptional } = { isOptional: false }) {
40
- if (isOptional && !hooks.length) return '';
41
- return variables + hooks.join('\r\n');
42
- }
43
-
44
- exports.default = {
45
- register,
46
- clear,
47
- emit
48
- };
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- // Licensed to the Software Freedom Conservancy (SFC) under one
7
- // or more contributor license agreements. See the NOTICE file
8
- // distributed with this work for additional information
9
- // regarding copyright ownership. The SFC licenses this file
10
- // to you under the Apache License, Version 2.0 (the
11
- // "License"); you may not use this file except in compliance
12
- // with the License. You may obtain a copy of the License at
13
- //
14
- // http://www.apache.org/licenses/LICENSE-2.0
15
- //
16
- // Unless required by applicable law or agreed to in writing,
17
- // software distributed under the License is distributed on an
18
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- // KIND, either express or implied. See the License for the
20
- // specific language governing permissions and limitations
21
- // under the License.
22
-
23
- let hooks = [];
24
-
25
- function register(statement) {
26
- hooks.push(statement);
27
- }
28
-
29
- function clear() {
30
- hooks = [];
31
- }
32
-
33
- function emit({ isOptional } = { isOptional: false }) {
34
- if (isOptional && !hooks.length) return '';
35
- return hooks.join('\r\n');
36
- }
37
-
38
- exports.default = {
39
- register,
40
- clear,
41
- emit
42
- };
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- // Licensed to the Software Freedom Conservancy (SFC) under one
7
- // or more contributor license agreements. See the NOTICE file
8
- // distributed with this work for additional information
9
- // regarding copyright ownership. The SFC licenses this file
10
- // to you under the Apache License, Version 2.0 (the
11
- // "License"); you may not use this file except in compliance
12
- // with the License. You may obtain a copy of the License at
13
- //
14
- // http://www.apache.org/licenses/LICENSE-2.0
15
- //
16
- // Unless required by applicable law or agreed to in writing,
17
- // software distributed under the License is distributed on an
18
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- // KIND, either express or implied. See the License for the
20
- // specific language governing permissions and limitations
21
- // under the License.
22
-
23
- let hooks = [];
24
-
25
- function register(statement) {
26
- hooks.push(statement);
27
- }
28
-
29
- function clear() {
30
- hooks = [];
31
- }
32
-
33
- function emit({ isOptional } = { isOptional: false }) {
34
- if (isOptional && !hooks.length) return '';
35
- return hooks.join('\r\n');
36
- }
37
-
38
- exports.default = {
39
- register,
40
- clear,
41
- emit
42
- };
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- // Licensed to the Software Freedom Conservancy (SFC) under one
7
- // or more contributor license agreements. See the NOTICE file
8
- // distributed with this work for additional information
9
- // regarding copyright ownership. The SFC licenses this file
10
- // to you under the Apache License, Version 2.0 (the
11
- // "License"); you may not use this file except in compliance
12
- // with the License. You may obtain a copy of the License at
13
- //
14
- // http://www.apache.org/licenses/LICENSE-2.0
15
- //
16
- // Unless required by applicable law or agreed to in writing,
17
- // software distributed under the License is distributed on an
18
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
- // KIND, either express or implied. See the License for the
20
- // specific language governing permissions and limitations
21
- // under the License.
22
-
23
- let hooks = [];
24
-
25
- function register(statement) {
26
- hooks.push(statement);
27
- }
28
-
29
- function clear() {
30
- hooks = [];
31
- }
32
-
33
- function emit({ isOptional } = { isOptional: false }) {
34
- if (isOptional && !hooks.length) return '';
35
- return hooks.join('\r\n');
36
- }
37
-
38
- exports.default = {
39
- register,
40
- clear,
41
- emit
42
- };
@@ -1,61 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.clearHooks = clearHooks;
7
-
8
- var _declareDependencies = require('./declareDependencies');
9
-
10
- var _declareDependencies2 = _interopRequireDefault(_declareDependencies);
11
-
12
- var _declareVariables = require('./declareVariables');
13
-
14
- var _declareVariables2 = _interopRequireDefault(_declareVariables);
15
-
16
- var _beforeAll = require('./beforeAll');
17
-
18
- var _beforeAll2 = _interopRequireDefault(_beforeAll);
19
-
20
- var _afterAll = require('./afterAll');
21
-
22
- var _afterAll2 = _interopRequireDefault(_afterAll);
23
-
24
- var _inEachBegin = require('./inEachBegin');
25
-
26
- var _inEachBegin2 = _interopRequireDefault(_inEachBegin);
27
-
28
- var _inEachEnd = require('./inEachEnd');
29
-
30
- var _inEachEnd2 = _interopRequireDefault(_inEachEnd);
31
-
32
- var _declareMethods = require('./declareMethods');
33
-
34
- var _declareMethods2 = _interopRequireDefault(_declareMethods);
35
-
36
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
-
38
- //import beforeEach from './beforeEach'
39
- //import afterEach from './afterEach'
40
- const hooks = [_declareDependencies2.default, _declareVariables2.default, _beforeAll2.default,
41
- //beforeEach,
42
- //afterEach,
43
- _afterAll2.default, _inEachBegin2.default, _inEachEnd2.default, _declareMethods2.default];
44
-
45
- function clearHooks() {
46
- hooks.forEach(hook => {
47
- hook.clear();
48
- });
49
- }
50
-
51
- exports.default = {
52
- dependencies: _declareDependencies2.default,
53
- variables: _declareVariables2.default,
54
- beforeAll: _beforeAll2.default,
55
- //beforeEach,
56
- //afterEach,
57
- afterAll: _afterAll2.default,
58
- inEachBegin: _inEachBegin2.default,
59
- inEachEnd: _inEachEnd2.default,
60
- methods: _declareMethods2.default
61
- };
package/dist/parsers.js DELETED
@@ -1,31 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.sanitizeName = sanitizeName;
7
- exports.capitalize = capitalize;
8
- // Licensed to the Software Freedom Conservancy (SFC) under one
9
- // or more contributor license agreements. See the NOTICE file
10
- // distributed with this work for additional information
11
- // regarding copyright ownership. The SFC licenses this file
12
- // to you under the Apache License, Version 2.0 (the
13
- // "License"); you may not use this file except in compliance
14
- // with the License. You may obtain a copy of the License at
15
- //
16
- // http://www.apache.org/licenses/LICENSE-2.0
17
- //
18
- // Unless required by applicable law or agreed to in writing,
19
- // software distributed under the License is distributed on an
20
- // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21
- // KIND, either express or implied. See the License for the
22
- // specific language governing permissions and limitations
23
- // under the License.
24
-
25
- function sanitizeName(input) {
26
- return input.replace(/([^a-z0-9]+)/gi, '');
27
- }
28
-
29
- function capitalize(input) {
30
- return input.charAt(0).toUpperCase() + input.substr(1);
31
- }