5a99f483b1
Tests are good. These put some sane rules around our random string generation utilities, and provides demo code for writing convenience test methods that can be applied to the global testing environment. Change-Id: Ib03382068bf3165addc4d96595850b6b0c3087cb
69 lines
1.9 KiB
Plaintext
69 lines
1.9 KiB
Plaintext
// Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
// not use this file except in compliance with the License. You may obtain
|
|
// a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
// License for the specific language governing permissions and limitations
|
|
// under the License.
|
|
|
|
/**
|
|
* This file contains JSHint configuration settings, which allow us to enforce a
|
|
* coding standard programatically using jshint. It's as close to PEP-8 as we
|
|
* can get it.
|
|
*
|
|
* @see http://www.jshint.com/
|
|
*/
|
|
{
|
|
"node": true,
|
|
"browser": true,
|
|
"esnext": true,
|
|
"bitwise": true,
|
|
"camelcase": false,
|
|
"curly": true,
|
|
"eqeqeq": true,
|
|
"immed": true,
|
|
"indent": 4,
|
|
"maxlen": 80,
|
|
"latedef": true,
|
|
"newcap": true,
|
|
"noarg": true,
|
|
"quotmark": "single",
|
|
"undef": true,
|
|
"unused": true,
|
|
"strict": true,
|
|
"trailing": true,
|
|
"smarttabs": true,
|
|
|
|
// Inform JSHint that the following globals are expected.
|
|
"globals": {
|
|
// Library constants
|
|
"$": false, // JQuery
|
|
"angular": false, // AngularJS
|
|
|
|
// Unit test constants
|
|
"after": false,
|
|
"afterEach": false,
|
|
"before": false,
|
|
"beforeEach": false,
|
|
"describe": false,
|
|
"expect": false,
|
|
"inject": false,
|
|
"it": false,
|
|
"spyOn": false,
|
|
"runs": false,
|
|
"waitsFor": false,
|
|
"jasmine": false,
|
|
|
|
// functional test constants
|
|
"browser": false,
|
|
"by": false,
|
|
"element": false,
|
|
"protractor": false // Protractor
|
|
}
|
|
} |