1.0.0 • Published 5 years ago

hello-world-tdd v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

HelloWorldTDD

Build Status Coverage Status

A little way to create one Hello World app, using TDD, Hooks, Travis, Coveralls, and much more.

Browser Support

This simple example is supported in the following browsers.

ChromeFirefoxOperaSafariIE

Methods

Follow the methods that the library provides.

helloWorld()

This will return a simple phrase Hello World.

helloWorldWithName(parameter)

This will return a phrase more your name parameter Hello World yourNameParameter.

Arguments

ArgumentTypeOptions
parameterstring'Is a name to concat in phrase'

Example

    console.log(helloworldtdd.helloWorldWithName("Douglas"))
    // Will return 'Hello World Douglas'
  })

Prerequisities

Do you need a little knowledge in JavaScript

Installing

npm install helloworldtdd --save-dev

just below a small example of import and use

How to use

ES6

// To import a specific method
import { helloWorldWithName } from 'helloworldtdd';

// For all methods use *
import * as yourAlias from 'helloworldtdd';

CommonJS

const youVariable = require('helloworldtdd');

// Using...
youVariable.helloWorldWithName("Name");

Using in Browser (UMD)

<!-- 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");

Running the tests

For run the test so you need a npm script execute

A example

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

Authors

Douglas Domenciano
Douglas Domenciano

See also the list of contributors who participated in this project.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Enjoy and play

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.