JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 127
  • Score
    100M100P100Q104113F
  • License MIT

@jobscale/slack

Package Exports

  • @jobscale/slack

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jobscale/slack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@jobscale/slack

install

npm i @jobscale/slack

example

send slack channel

const { Slack } = require('..');
const env = require('./env.json');

describe('test slack send', () => {
  it('toStrictEqual prompt', () => {
    const params = { text: 'jest test send' };
    return new Slack(env).send(params)
    .then(res => {
      const prompt = { status: 200, statusText: 'OK', body: 'ok' };
      logger.info(res);
      expect(res).toStrictEqual(prompt);
    });
  });
});

clear slack channel

const { Slack } = require('..');
const env = require('./env.json');

describe('test slack clear channel', () => {
  it('toBe prompt', () => {
    const prompt = 1;
    return new Slack(env).clearChannel(prompt)
    .then(res => {
      logger.info(res);
      expect(res.deleted).toBe(prompt);
    });
  });
});