loadFixtureJson function

Map<String, dynamic> loadFixtureJson(
  1. String name,
  2. {String path = 'test/fixtures'}
)

Implementation

Map<String, dynamic> loadFixtureJson(String name,
    {String path = 'test/fixtures'}) {
  final Map environmentVars = Platform.environment;
  final current = environmentVars['PWD'];
  return Map<String, dynamic>.from(
      jsonDecode(File('$current/$path/$name.json').readAsStringSync()));
}