Socket
Socket
Sign inDemoInstall

@nuskin/ns-account

Package Overview
Dependencies
251
Maintainers
5
Versions
1779
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nuskin/ns-account

Nu Skin account libraries


Version published
Weekly downloads
443
increased by144.75%
Maintainers
5
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 12 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc