scalvert / ember-cli-checkup

An Ember CLI addon that provides health check information about your application, engine, or addon.
MIT License
7 stars 1 forks source link

Result Output format for the AST File searcher #64

Open suchitadoshi1987 opened 5 years ago

suchitadoshi1987 commented 5 years ago

For generic result data we could have something like this:

resultData: [
  {
    type: 'unit-test',
    path: 'tests/unit/bar-test.js',
    line: 22,
    value: 'module',
  },
  {
    type: 'unit-test',
    path: 'tests/unit/foo-test.js',
    line: 67,
    value: 'test',
  },
  {
    type: 'unit-test',
    path: 'tests/unit/bar-test.js',
    line: 84,
    value: 'test',
  },  
]

For specific ones eg: test, we could have something similar to above but maybe addition of the description of that test/module too? 🤷‍♀

resultData: [
  {
    type: 'unit-test',
    path: 'tests/unit/bar-test.js',
    line: 22,
    description: 'Unit | Bar Test',
    value: 'module',
  },
  {
    type: 'unit-test',
    path: 'tests/unit/foo-test.js',
    line: 67,
    description: 'it should be an awesome foo test',
    value: 'test',
  },
  {
    type: 'unit-test',
    path: 'tests/unit/bar-test.js',
    line: 84,
    description: 'it should be an awesome bar test',
    value: 'test',
  },  
]