Natural Performance Manager

    @nuskin/ns-account

    4.25.2 • Public • Published

    latest release

    @nuskin/ns-account

    Contains shared JS services for accounts.

    Installing

    Usng npm:

    npm add @nuskin/ns-account

    Usng yarn:

    yarn add @nuskin/ns-account

    Resources

    • Changelog could go here

    Development

    Currently, test coverage is quite low - there are comprehensive tests for a single function in authenticationService. This served to test that we've got the basic infrastructure to get tests written, though they'll be a little messy until we have a chance to do some refactoring (like, for example, reducing our dependence on jQuery).

    Test Mocks

    Currently, there are partial mocks implemented for:

    • ns-util
      • configurationService
        • getMarketConfig
      • storage
        • default function
        • removeItem
    • jquery
      • $.ajax - mocked by importing 'mock-jquery-ajax.js' and calling the default:
        import mockAjax from './mock-jquery-ajax.js';
        
        mockAjax($); // pass in the global jquery instance
        
        // in a test
        
        $.ajax.mockSuccess({'success': 'response'});
        $.ajax.mockFailure({'failure': 'response'});
        $.ajax.mockResult((successCallback) => {/* simulate success */ }, (failCallback) => {/* simulate failure */});

    License

    MIT

    Keywords

    none

    Install

    npm i @nuskin/ns-account

    DownloadsWeekly Downloads

    3,962

    Version

    4.25.2

    License

    none

    Unpacked Size

    220 kB

    Total Files

    22

    Last publish

    Collaborators

    • nkranendonk
    • emoore
    • nuskin-cws
    • klau
    • rellenberger