{"size": 720, "ext": "js", "max_stars_repo_path": "test/message/models/CQMusic.js", "max_stars_repo_name": "Tsuk1ko/node-cq-websocket", "max_stars_repo_stars_event_min_datetime": "2022-03-24T10:24:57.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-24T10:24:57.000Z", "max_issues_repo_path": "test/message/models/CQMusic.js", "max_issues_repo_name": "Tsuk1ko/node-cq-websocket", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/message/models/CQMusic.js", "max_forks_repo_name": "Tsuk1ko/node-cq-websocket", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.4615384615, "max_line_length": 78, "alphanum_fraction": 0.4333333333}
const { CQMusic } = require('../../..');
const CQFakeTag = require('../../fixture/CQFakeTag');

module.exports = {
  name: 'CQMusic',
  equals: {
    target: new CQMusic('qq', 1),
    equal: [new CQMusic('qq', 1)],
    inequal: [new CQMusic('qq', 2), new CQMusic('xiami', 1), new CQFakeTag()],
  },
  toString: [
    {
      target: new CQMusic('qq', 1),
      string: '[CQ:music,type=qq,id=1]',
    },
  ],
  toJSON: [
    {
      target: new CQMusic('qq', 1),
      json: {
        type: 'music',
        data: {
          type: 'qq',
          id: '1',
        },
      },
    },
  ],
  coerce: [
    {
      target: '[CQ:music,type=qq,id=1]',
      spec: {
        type: 'qq',
        id: 1,
      },
    },
  ],
};
