mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
46 lines
1.7 KiB
HTML
46 lines
1.7 KiB
HTML
<!doctype html>
|
|
<!--
|
|
@license
|
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
Code distributed by Google as part of the polymer project is also
|
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
-->
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
|
|
<script src="wct-browser-config.js"></script>
|
|
<script src="../../node_modules/wct-browser-legacy/browser.js"></script>
|
|
<script type="module" src="../../lib/utils/case-map.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<script type="module">
|
|
import * as caseMap$0 from '../../lib/utils/case-map.js';
|
|
suite('case-map', function() {
|
|
var caseMap;
|
|
|
|
setup(function() {
|
|
caseMap = caseMap$0;
|
|
});
|
|
|
|
test('camelToDashCase converts to dashes', function() {
|
|
assert.equal(caseMap.camelToDashCase('camelCase'), 'camel-case');
|
|
assert.equal(caseMap.camelToDashCase('camelCCase'), 'camel-c-case');
|
|
});
|
|
|
|
test('dashToCamelCase converts to camelCase', function() {
|
|
assert.equal(caseMap.dashToCamelCase('camel-case'), 'camelCase');
|
|
assert.equal(caseMap.dashToCamelCase('camel-c-case'), 'camelCCase');
|
|
});
|
|
|
|
test('camelToDashCase and dashToCamelCase reverse the other function', function() {
|
|
var camelCase = caseMap.dashToCamelCase('camel-c-case');
|
|
assert.equal(caseMap.camelToDashCase(camelCase), 'camel-c-case');
|
|
});
|
|
});
|
|
</script>
|