A little way to create one Hello World app, using TDD, Hooks, Travis, Coveralls, and much more.
This simple example is supported in the following browsers.
✔ | ✔ | ✔ | ✔ | ✔ |
Follow the methods that the library provides.
This will return a simple phrase
Hello World
.
This will return a phrase more your name parameter
Hello World yourNameParameter
.
Arguments
Argument | Type | Options |
---|---|---|
parameter |
string | 'Is a name to concat in phrase' |
Example
console.log(helloworldtdd.helloWorldWithName("Douglas"))
// Will return 'Hello World Douglas'
})
Do you need a little knowledge in JavaScript
npm install helloworldtdd --save-dev
just below a small example of import and use
// To import a specific method
import { helloWorldWithName } from 'helloworldtdd';
// For all methods use *
import * as yourAlias from 'helloworldtdd';
const youVariable = require('helloworldtdd');
// Using...
youVariable.helloWorldWithName("Name");
<!-- to import -->
<script src="spotify-wrapper.umd.min.js"></script>
After that the library will be available to the Global as helloworldtdd
. Follow an example:
// To setting a return value in you div to show for user...
document.getElementById('yourDiv').innerHTML = helloworldtdd.helloWorldWithName("NameToShow");
For run the test so you need a npm script execute
Running only once
npm test
Running with a watcher for reload on save the files
npm run test:tdd
And if you need a status of coverage tests run
npm run test:coverage
Douglas Domenciano |
See also the list of contributors who participated in this project.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
This project is licensed under the MIT License - see the LICENSE.md file for details
It is a small and very simple lib, but it was created for study reasons, thank you to everyone who can give you suggestions, tips for improvements, etc ...
Thanks.